mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-31 15:33:37 +02:00
commit bash-20080703 snapshot
This commit is contained in:
+784
-728
File diff suppressed because it is too large
Load Diff
+112
-25
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@po.cwru.edu
|
||||
.\"
|
||||
.\" Last Change: Sun Jun 29 22:44:15 EDT 2008
|
||||
.\" Last Change: Sun Jul 6 14:33:52 EDT 2008
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2008 June 29" "GNU Bash-4.0"
|
||||
.TH BASH 1 "2008 July 6" "GNU Bash-4.0"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -871,6 +871,42 @@ The exit status of the \fBwhile\fP and \fBuntil\fP commands
|
||||
is the exit status
|
||||
of the last \fBdo\fP \fIlist\fP command executed, or zero if
|
||||
none was executed.
|
||||
.SS Coprocesses
|
||||
.PP
|
||||
A \fIcoprocess\fP is a shell command preceded by the \fBcoproc\fP reserved
|
||||
word.
|
||||
A coprocess is executed asynchronously in a subshell, as if the command
|
||||
had been terminated with the \fB&\fP control operator, with a two-way pipe
|
||||
established between the executing shell and the coprocess.
|
||||
.PP
|
||||
The format for a coprocess is:
|
||||
.RS
|
||||
.PP
|
||||
\fBcoproc\fP [\fINAME\fP] \fIcommand\fP [\fIredirections\fP]
|
||||
.RE
|
||||
.PP
|
||||
This creates a coprocess named \fINAME\fP.
|
||||
If \fINAME\fP is not supplied, the default name is \fICOPROC\fP.
|
||||
When the coproc is executed, the shell creates an array variable (see
|
||||
.B Arrays
|
||||
below) named \fINAME\fP in the context of the executing shell.
|
||||
The standard output of
|
||||
.I command
|
||||
is connected via a pipe to a file descriptor in the executing shell,
|
||||
and that file descriptor is assigned to \fINAME\fP[0].
|
||||
The standard input of
|
||||
.I command
|
||||
is connected via a pipe to a file descriptor in the executing shell,
|
||||
and that file descriptor is assigned to \fINAME\fP[1].
|
||||
This pipe is established before any redirections specified by the
|
||||
command (see
|
||||
.SM
|
||||
.B REDIRECTION
|
||||
below).
|
||||
The file descriptors can be utilized as arguments to shell commands
|
||||
and redirections using standard word expansions.
|
||||
.PP
|
||||
The return status of a coprocess is the exit status of \fIcommand\fP.
|
||||
.SS Shell Function Definitions
|
||||
.PP
|
||||
A shell function is an object that is called like a simple command and
|
||||
@@ -2116,15 +2152,15 @@ parser to treat the rest of the line as a comment.
|
||||
.SS Arrays
|
||||
.B Bash
|
||||
provides one-dimensional indexed and associative array variables.
|
||||
Any variable may be used as an array; the
|
||||
Any variable may be used as an indexed array; the
|
||||
.B declare
|
||||
builtin will explicitly declare an array.
|
||||
There is no maximum
|
||||
limit on the size of an array, nor any requirement that members
|
||||
be indexed or assigned contiguously.
|
||||
Indexed arrays are referenced using integers (including arithmetic
|
||||
expressions) and are zero-based; associative arrays use arbitrary
|
||||
strings.
|
||||
expressions) and are zero-based; associative arrays are referenced
|
||||
using arbitrary strings.
|
||||
.PP
|
||||
An indexed array is created automatically if any variable is assigned to
|
||||
using the syntax \fIname\fP[\fIsubscript\fP]=\fIvalue\fP. The
|
||||
@@ -2138,21 +2174,24 @@ use
|
||||
.B SHELL BUILTIN COMMANDS
|
||||
below).
|
||||
.B declare \-a \fIname\fP[\fIsubscript\fP]
|
||||
is also accepted; the \fIsubscript\fP is ignored. Attributes may be
|
||||
is also accepted; the \fIsubscript\fP is ignored.
|
||||
.PP
|
||||
Associative arrays are created using
|
||||
.BR "declare \-A \fIname\fP" .
|
||||
.PP
|
||||
Attributes may be
|
||||
specified for an array variable using the
|
||||
.B declare
|
||||
and
|
||||
.B readonly
|
||||
builtins. Each attribute applies to all members of an array.
|
||||
.PP
|
||||
Associative arrays are created using
|
||||
.BR declare \-A \fIname\fP .
|
||||
.PP
|
||||
Arrays are assigned to using compound assignments of the form
|
||||
\fIname\fP=\fB(\fPvalue\fI1\fP ... value\fIn\fP\fB)\fP, where each
|
||||
\fIvalue\fP is of the form [\fIsubscript\fP]=\fIstring\fP. Only
|
||||
\fIstring\fP is required. When using indexed arrays, if
|
||||
the optional brackets and subscript are supplied, that index is assigned to;
|
||||
\fIvalue\fP is of the form [\fIsubscript\fP]=\fIstring\fP.
|
||||
Indexed array assignments do not require the bracket and subscript.
|
||||
When assigning to indexed arrays, if the optional brackets and subscript
|
||||
are supplied, that index is assigned to;
|
||||
otherwise the index of the element assigned is the last index assigned
|
||||
to by the statement plus one. Indexing starts at zero.
|
||||
.PP
|
||||
@@ -2508,11 +2547,13 @@ If \fIoffset\fP evaluates to a number less than zero, the value
|
||||
is used as an offset from the end of the value of \fIparameter\fP.
|
||||
If \fIparameter\fP is \fB@\fP, the result is \fIlength\fP positional
|
||||
parameters beginning at \fIoffset\fP.
|
||||
If \fIparameter\fP is an array name indexed by @ or *,
|
||||
If \fIparameter\fP is an indexed array name subscripted 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.
|
||||
Substring expansion applied to an associative array produces undefined
|
||||
results.
|
||||
Note that a negative offset must be separated from the colon by at least
|
||||
one space to avoid being confused with the :- expansion.
|
||||
Substring indexing is zero-based unless the positional parameters
|
||||
@@ -2653,6 +2694,43 @@ or
|
||||
.BR * ,
|
||||
the substitution operation is applied to each member of the
|
||||
array in turn, and the expansion is the resultant list.
|
||||
.TP
|
||||
${\fIparameter\fP\fB^\fP\fIpattern\fP}
|
||||
.PD 0
|
||||
.TP
|
||||
${\fIparameter\fP\fB^^\fP\fIpattern\fP}
|
||||
.TP
|
||||
${\fIparameter\fP\fB,\fP\fIpattern\fP}
|
||||
.TP
|
||||
${\fIparameter\fP\fB,,\fP\fIpattern\fP}
|
||||
.PD
|
||||
This expansion modifies the case of alphabetic characters in \fIparameter\fP.
|
||||
The \fIpattern\fP is expanded to produce a pattern just as in
|
||||
pathname expansion.
|
||||
The \fB^\fP operator converts lowercase letters matching \fIpattern\fP
|
||||
to uppercase; the \fB,\fP operator converts matching uppercase letters
|
||||
to lowercase.
|
||||
The \fB^^\fP and \fB,,\fP expansions convert each matched character in the
|
||||
expanded value; the \fB^\fP and \fB,\fP expansions match and convert only
|
||||
the first character.
|
||||
If \fIpattern\fP is omitted, it is treated like a \fB?\fP, which matches
|
||||
every character.
|
||||
If
|
||||
.I parameter
|
||||
is
|
||||
.B @
|
||||
or
|
||||
.BR * ,
|
||||
the case modification operation is applied to each positional
|
||||
parameter in turn, and the expansion is the resultant list.
|
||||
If
|
||||
.I parameter
|
||||
is an array variable subscripted with
|
||||
.B @
|
||||
or
|
||||
.BR * ,
|
||||
the case modification operation is applied to each member of the
|
||||
array in turn, and the expansion is the resultant list.
|
||||
.SS Command Substitution
|
||||
.PP
|
||||
\fICommand substitution\fP allows the output of a command to replace
|
||||
@@ -6645,10 +6723,10 @@ is greater than the number of enclosing loops, the last enclosing loop
|
||||
(the ``top-level'' loop) is resumed.
|
||||
The return value is 0 unless \fIn\fP is not greater than or equal to 1.
|
||||
.TP
|
||||
\fBdeclare\fP [\fB\-aAfFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
|
||||
\fBdeclare\fP [\fB\-aAfFilrtux\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
|
||||
.PD 0
|
||||
.TP
|
||||
\fBtypeset\fP [\fB\-aAfFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
|
||||
\fBtypeset\fP [\fB\-aAfFilrtux\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
|
||||
.PD
|
||||
Declare variables and/or give them attributes.
|
||||
If no \fIname\fPs are given then display the values of variables.
|
||||
@@ -6702,6 +6780,11 @@ The variable is treated as an integer; arithmetic evaluation (see
|
||||
.B "ARITHMETIC EVALUATION" ") "
|
||||
is performed when the variable is assigned a value.
|
||||
.TP
|
||||
.B \-l
|
||||
When the variable is assigned a value, all upper-case characters are
|
||||
converted to lower-case.
|
||||
The upper-case attribute is disabled.
|
||||
.TP
|
||||
.B \-r
|
||||
Make \fIname\fPs readonly. These names cannot then be assigned values
|
||||
by subsequent assignment statements or unset.
|
||||
@@ -6712,6 +6795,11 @@ 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 \-u
|
||||
When the variable is assigned a value, all lower-case characters are
|
||||
converted to upper-case.
|
||||
The lower-case attribute is disabled.
|
||||
.TP
|
||||
.B \-x
|
||||
Mark \fIname\fPs for export to subsequent commands via the environment.
|
||||
.PD
|
||||
@@ -7505,9 +7593,7 @@ is supplied, or
|
||||
.B logout
|
||||
Exit a login shell.
|
||||
.TP
|
||||
\fBmapfile\fP [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcou
|
||||
nt\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \f
|
||||
Iquantum\fP] [\fIarray\fP]
|
||||
\fBmapfile\fP [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcount\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \fIquantum\fP] [\fIarray\fP]
|
||||
Read lines from the standard input into array variable
|
||||
.IR array ,
|
||||
or from file descriptor
|
||||
@@ -7709,7 +7795,7 @@ The return status is 0 unless an error occurs while
|
||||
reading the name of the current directory or an
|
||||
invalid option is supplied.
|
||||
.TP
|
||||
\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fb\-\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
|
||||
\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
|
||||
One line is read from the standard input, or from the file descriptor
|
||||
\fIfd\fP supplied as an argument to the \fB\-u\fP option, and the first word
|
||||
is assigned to the first
|
||||
@@ -7798,8 +7884,8 @@ are supplied, the line read is assigned to the variable
|
||||
.SM
|
||||
.BR REPLY .
|
||||
The return code is zero, unless end-of-file is encountered, \fBread\fP
|
||||
times out, or an invalid file descriptor is supplied as the argument to
|
||||
\fB\-u\fP.
|
||||
times out (in which case the return code is greater than 128), or an
|
||||
invalid file descriptor is supplied as the argument to \fB\-u\fP.
|
||||
.RE
|
||||
.TP
|
||||
\fBreadonly\fP [\fB\-aApf\fP] [\fIname\fP[=\fIword\fP] ...]
|
||||
@@ -8555,11 +8641,10 @@ by default.
|
||||
Suspend the execution of this shell until it receives a
|
||||
.SM
|
||||
.B SIGCONT
|
||||
signal. The
|
||||
signal. A login shell cannot be suspended; the
|
||||
.B \-f
|
||||
option says not to complain if this is
|
||||
a login shell; just suspend anyway. The return status is 0 unless
|
||||
the shell is a login shell and
|
||||
option can be used to override this and force the suspension.
|
||||
The return status is 0 unless the shell is a login shell and
|
||||
.B \-f
|
||||
is not supplied, or if job control is not enabled.
|
||||
.TP
|
||||
@@ -9249,5 +9334,7 @@ unmatched parentheses, even inside shell comments, will result in
|
||||
error messages while the construct is being read.
|
||||
.PP
|
||||
Array variables may not (yet) be exported.
|
||||
.PP
|
||||
There may be only one active coprocess at a time.
|
||||
.zZ
|
||||
.zY
|
||||
|
||||
+112
-25
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@po.cwru.edu
|
||||
.\"
|
||||
.\" Last Change: Mon Jun 2 20:32:53 EDT 2008
|
||||
.\" Last Change: Sun Jul 6 14:33:52 EDT 2008
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2008 June 2" "GNU Bash-4.0"
|
||||
.TH BASH 1 "2008 July 6" "GNU Bash-4.0"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -871,6 +871,42 @@ The exit status of the \fBwhile\fP and \fBuntil\fP commands
|
||||
is the exit status
|
||||
of the last \fBdo\fP \fIlist\fP command executed, or zero if
|
||||
none was executed.
|
||||
.SS Coprocesses
|
||||
.PP
|
||||
A \fIcoprocess\fP is a shell command preceded by the \fBcoproc\fP reserved
|
||||
word.
|
||||
A coprocess is executed asynchronously in a subshell, as if the command
|
||||
had been terminated with the \fB&\fP control operator, with a two-way pipe
|
||||
established between the executing shell and the coprocess.
|
||||
.PP
|
||||
The format for a coprocess is:
|
||||
.RS
|
||||
.PP
|
||||
\fBcoproc\fP [\fINAME\fP] \fIcommand\fP [\fIredirections\fP]
|
||||
.RE
|
||||
.PP
|
||||
This creates a coprocess named \fINAME\fP.
|
||||
If \fINAME\fP is not supplied, the default name is \fICOPROC\fP.
|
||||
When the coproc is executed, the shell creates an array variable (see
|
||||
.B arrays
|
||||
below) named \fINAME\fP in the context of the executing shell.
|
||||
The standard output of
|
||||
.I command
|
||||
is connected via a pipe to a file descriptor in the executing shell,
|
||||
and that file descriptor is assigned to \fINAME\fP[0].
|
||||
The standard input of
|
||||
.I command
|
||||
is connected via a pipe to a file descriptor in the executing shell,
|
||||
and that file descriptor is assigned to \fINAME\fP[1].
|
||||
This pipe is established before any redirections specified by the
|
||||
command (see
|
||||
.SM
|
||||
.B REDIRECTION
|
||||
below).
|
||||
The file descriptors can be utilized as arguments to shell commands
|
||||
and redirections using standard word expansions.
|
||||
.PP
|
||||
The return status of a coprocess is the exit status of \fIcommand\fP.
|
||||
.SS Shell Function Definitions
|
||||
.PP
|
||||
A shell function is an object that is called like a simple command and
|
||||
@@ -2116,15 +2152,15 @@ parser to treat the rest of the line as a comment.
|
||||
.SS Arrays
|
||||
.B Bash
|
||||
provides one-dimensional indexed and associative array variables.
|
||||
Any variable may be used as an array; the
|
||||
Any variable may be used as an indexed array; the
|
||||
.B declare
|
||||
builtin will explicitly declare an array.
|
||||
There is no maximum
|
||||
limit on the size of an array, nor any requirement that members
|
||||
be indexed or assigned contiguously.
|
||||
Indexed arrays are referenced using integers (including arithmetic
|
||||
expressions) and are zero-based; associative arrays use arbitrary
|
||||
strings.
|
||||
expressions) and are zero-based; associative arrays are referenced
|
||||
using arbitrary strings.
|
||||
.PP
|
||||
An indexed array is created automatically if any variable is assigned to
|
||||
using the syntax \fIname\fP[\fIsubscript\fP]=\fIvalue\fP. The
|
||||
@@ -2138,21 +2174,24 @@ use
|
||||
.B SHELL BUILTIN COMMANDS
|
||||
below).
|
||||
.B declare \-a \fIname\fP[\fIsubscript\fP]
|
||||
is also accepted; the \fIsubscript\fP is ignored. Attributes may be
|
||||
is also accepted; the \fIsubscript\fP is ignored.
|
||||
.PP
|
||||
Associative arrays are created using
|
||||
.BR "declare \-A \fIname\fP" .
|
||||
.PP
|
||||
Attributes may be
|
||||
specified for an array variable using the
|
||||
.B declare
|
||||
and
|
||||
.B readonly
|
||||
builtins. Each attribute applies to all members of an array.
|
||||
.PP
|
||||
Associative arrays are created using
|
||||
.BR declare \-A \fIname\fP .
|
||||
.PP
|
||||
Arrays are assigned to using compound assignments of the form
|
||||
\fIname\fP=\fB(\fPvalue\fI1\fP ... value\fIn\fP\fB)\fP, where each
|
||||
\fIvalue\fP is of the form [\fIsubscript\fP]=\fIstring\fP. Only
|
||||
\fIstring\fP is required. When using indexed arrays, if
|
||||
the optional brackets and subscript are supplied, that index is assigned to;
|
||||
\fIvalue\fP is of the form [\fIsubscript\fP]=\fIstring\fP.
|
||||
Indexed array assignments do not require the bracket and subscript.
|
||||
When assigning to indexed arrays, if the optional brackets and subscript
|
||||
are supplied, that index is assigned to;
|
||||
otherwise the index of the element assigned is the last index assigned
|
||||
to by the statement plus one. Indexing starts at zero.
|
||||
.PP
|
||||
@@ -2508,11 +2547,13 @@ If \fIoffset\fP evaluates to a number less than zero, the value
|
||||
is used as an offset from the end of the value of \fIparameter\fP.
|
||||
If \fIparameter\fP is \fB@\fP, the result is \fIlength\fP positional
|
||||
parameters beginning at \fIoffset\fP.
|
||||
If \fIparameter\fP is an array name indexed by @ or *,
|
||||
If \fIparameter\fP is an indexed array name subscripted 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.
|
||||
Substring expansion applied to an associative array produces undefined
|
||||
results.
|
||||
Note that a negative offset must be separated from the colon by at least
|
||||
one space to avoid being confused with the :- expansion.
|
||||
Substring indexing is zero-based unless the positional parameters
|
||||
@@ -2653,6 +2694,43 @@ or
|
||||
.BR * ,
|
||||
the substitution operation is applied to each member of the
|
||||
array in turn, and the expansion is the resultant list.
|
||||
.TP
|
||||
${\fIparameter\fP\fB^\fP\fIpattern\fP}
|
||||
.PD 0
|
||||
.TP
|
||||
${\fIparameter\fP\fB^^\fP\fIpattern\fP}
|
||||
.TP
|
||||
${\fIparameter\fP\fB,\fP\fIpattern\fP}
|
||||
.TP
|
||||
${\fIparameter\fP\fB,,\fP\fIpattern\fP}
|
||||
.PD
|
||||
This expansion modifies the case of alphabetic characters in \fIparameter\fP.
|
||||
The \fIpattern\fP is expanded to produce a pattern just as in
|
||||
pathname expansion.
|
||||
The \fB^\fP operator converts lowercase letters matching \fIpattern\fP
|
||||
to uppercase; the \fB,\fP operator converts matching uppercase letters
|
||||
to lowercase.
|
||||
The \fB^^\fP and \fB,,\fP expansions convert each matched character in the
|
||||
expanded value; the \fB^\fP and \fB,\fP expansions match and convert only
|
||||
the first character.
|
||||
If \fIpattern\fP is omitted, it is treated like a \fB?\fP, which matches
|
||||
every character.
|
||||
If
|
||||
.I parameter
|
||||
is
|
||||
.B @
|
||||
or
|
||||
.BR * ,
|
||||
the case modification operation is applied to each positional
|
||||
parameter in turn, and the expansion is the resultant list.
|
||||
If
|
||||
.I parameter
|
||||
is an array variable subscripted with
|
||||
.B @
|
||||
or
|
||||
.BR * ,
|
||||
the case modification operation is applied to each member of the
|
||||
array in turn, and the expansion is the resultant list.
|
||||
.SS Command Substitution
|
||||
.PP
|
||||
\fICommand substitution\fP allows the output of a command to replace
|
||||
@@ -6645,10 +6723,10 @@ is greater than the number of enclosing loops, the last enclosing loop
|
||||
(the ``top-level'' loop) is resumed.
|
||||
The return value is 0 unless \fIn\fP is not greater than or equal to 1.
|
||||
.TP
|
||||
\fBdeclare\fP [\fB\-aAfFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
|
||||
\fBdeclare\fP [\fB\-aAfFilrtux\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
|
||||
.PD 0
|
||||
.TP
|
||||
\fBtypeset\fP [\fB\-aAfFirtx\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
|
||||
\fBtypeset\fP [\fB\-aAfFilrtux\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
|
||||
.PD
|
||||
Declare variables and/or give them attributes.
|
||||
If no \fIname\fPs are given then display the values of variables.
|
||||
@@ -6702,6 +6780,11 @@ The variable is treated as an integer; arithmetic evaluation (see
|
||||
.B "ARITHMETIC EVALUATION" ") "
|
||||
is performed when the variable is assigned a value.
|
||||
.TP
|
||||
.B \-l
|
||||
When the variable is assigned a value, all upper-case characters are
|
||||
converted to lower-case.
|
||||
The upper-case attribute is disabled.
|
||||
.TP
|
||||
.B \-r
|
||||
Make \fIname\fPs readonly. These names cannot then be assigned values
|
||||
by subsequent assignment statements or unset.
|
||||
@@ -6712,6 +6795,11 @@ 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 \-u
|
||||
When the variable is assigned a value, all lower-case characters are
|
||||
converted to upper-case.
|
||||
The lower-case attribute is disabled.
|
||||
.TP
|
||||
.B \-x
|
||||
Mark \fIname\fPs for export to subsequent commands via the environment.
|
||||
.PD
|
||||
@@ -7505,9 +7593,7 @@ is supplied, or
|
||||
.B logout
|
||||
Exit a login shell.
|
||||
.TP
|
||||
\fBmapfile\fP [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcou
|
||||
nt\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \f
|
||||
Iquantum\fP] [\fIarray\fP]
|
||||
\fBmapfile\fP [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcount\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \fIquantum\fP] [\fIarray\fP]
|
||||
Read lines from the standard input into array variable
|
||||
.IR array ,
|
||||
or from file descriptor
|
||||
@@ -7709,7 +7795,7 @@ The return status is 0 unless an error occurs while
|
||||
reading the name of the current directory or an
|
||||
invalid option is supplied.
|
||||
.TP
|
||||
\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fb\-\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
|
||||
\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
|
||||
One line is read from the standard input, or from the file descriptor
|
||||
\fIfd\fP supplied as an argument to the \fB\-u\fP option, and the first word
|
||||
is assigned to the first
|
||||
@@ -7798,8 +7884,8 @@ are supplied, the line read is assigned to the variable
|
||||
.SM
|
||||
.BR REPLY .
|
||||
The return code is zero, unless end-of-file is encountered, \fBread\fP
|
||||
times out, or an invalid file descriptor is supplied as the argument to
|
||||
\fB\-u\fP.
|
||||
times out (in which case the return code is greater than 128), or an
|
||||
invalid file descriptor is supplied as the argument to \fB\-u\fP.
|
||||
.RE
|
||||
.TP
|
||||
\fBreadonly\fP [\fB\-aApf\fP] [\fIname\fP[=\fIword\fP] ...]
|
||||
@@ -8555,11 +8641,10 @@ by default.
|
||||
Suspend the execution of this shell until it receives a
|
||||
.SM
|
||||
.B SIGCONT
|
||||
signal. The
|
||||
signal. A login shell cannot be suspended; the
|
||||
.B \-f
|
||||
option says not to complain if this is
|
||||
a login shell; just suspend anyway. The return status is 0 unless
|
||||
the shell is a login shell and
|
||||
option can be used to override this and force the suspension.
|
||||
The return status is 0 unless the shell is a login shell and
|
||||
.B \-f
|
||||
is not supplied, or if job control is not enabled.
|
||||
.TP
|
||||
@@ -9249,5 +9334,7 @@ unmatched parentheses, even inside shell comments, will result in
|
||||
error messages while the construct is being read.
|
||||
.PP
|
||||
Array variables may not (yet) be exported.
|
||||
.PP
|
||||
There may be only one active coprocess at a time.
|
||||
.zZ
|
||||
.zY
|
||||
|
||||
+135
-33
@@ -3,7 +3,7 @@
|
||||
</HEAD>
|
||||
<BODY><TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2008 May 25<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2008 June 29<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<BR><A HREF="#index">Index</A>
|
||||
@@ -1467,7 +1467,9 @@ When += is applied to an array variable using compound assignment (see
|
||||
|
||||
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.
|
||||
appended to the array beginning at one greater than the array's maximum index
|
||||
(for indexed arrays) or added as additional key-value pairs in an
|
||||
associative array.
|
||||
When applied to a string-valued variable, <I>value</I> is expanded and
|
||||
appended to the variable's value.
|
||||
<A NAME="lbAT"> </A>
|
||||
@@ -1644,6 +1646,13 @@ Expands to the full file name used to invoke this instance of
|
||||
Expands to the process id of the current <B>bash</B> process.
|
||||
This differs from <B>$$</B> under certain circumstances, such as subshells
|
||||
that do not require <B>bash</B> to be re-initialized.
|
||||
<DT><B>BASH_ALIASES</B>
|
||||
|
||||
<DD>
|
||||
An associative array variable whose members correspond to the internal
|
||||
list of aliases as maintained by the <B>alias</B> builtin
|
||||
Elements added to this array appear in the alias list; unsetting array
|
||||
elements cause aliases to be removed from the alias list.
|
||||
<DT><B>BASH_ARGC</B>
|
||||
|
||||
<DD>
|
||||
@@ -1678,6 +1687,13 @@ option to the
|
||||
<B>shopt</B>
|
||||
|
||||
builtin below)
|
||||
<DT><B>BASH_CMDS</B>
|
||||
|
||||
<DD>
|
||||
An associative array variable whose members correspond to the internal
|
||||
hash table of commands as maintained by the <B>hash</B> builtin.
|
||||
Elements added to this array appear in the hash table; unsetting array
|
||||
elements cause commands to be removed from the hash table.
|
||||
<DT><B>BASH_COMMAND</B>
|
||||
|
||||
<DD>
|
||||
@@ -2501,6 +2517,16 @@ had been executed.
|
||||
<DD>
|
||||
If set, the value is executed as a command prior to issuing each primary
|
||||
prompt.
|
||||
<DT><B>PROMPT_DIRTRIM</B>
|
||||
|
||||
<DD>
|
||||
If set to a number greater than zero, the value is used as the number of
|
||||
trailing directory components to retain when expanding the <B>\w and
|
||||
\W</B> prompt string escapes (see
|
||||
<FONT SIZE=-1><B>PROMPTING</B>
|
||||
|
||||
</FONT>
|
||||
below). Characters removed are replaced with an ellipsis.
|
||||
<DT><B>PS1</B>
|
||||
|
||||
<DD>
|
||||
@@ -2688,22 +2714,26 @@ parser to treat the rest of the line as a comment.
|
||||
|
||||
<B>Bash</B>
|
||||
|
||||
provides one-dimensional array variables. Any variable may be used as
|
||||
an array; the
|
||||
provides one-dimensional indexed and associative array variables.
|
||||
Any variable may be used as an indexed array; the
|
||||
<B>declare</B>
|
||||
|
||||
builtin will explicitly declare an array. There is no maximum
|
||||
builtin will explicitly declare an array.
|
||||
There is no maximum
|
||||
limit on the size of an array, nor any requirement that members
|
||||
be indexed or assigned contiguously. Arrays are indexed using
|
||||
integers and are zero-based.
|
||||
be indexed or assigned contiguously.
|
||||
Indexed arrays are referenced using integers (including arithmetic
|
||||
expressions) and are zero-based; associative arrays are referenced
|
||||
using arbitrary strings.
|
||||
<P>
|
||||
|
||||
An array is created automatically if any variable is assigned to using
|
||||
the syntax <I>name</I>[<I>subscript</I>]=<I>value</I>. The
|
||||
An indexed array is created automatically if any variable is assigned to
|
||||
using the syntax <I>name</I>[<I>subscript</I>]=<I>value</I>. The
|
||||
<I>subscript</I>
|
||||
|
||||
is treated as an arithmetic expression that must evaluate to a number
|
||||
greater than or equal to zero. To explicitly declare an array, use
|
||||
greater than or equal to zero. To explicitly declare an indexed array,
|
||||
use
|
||||
<B>declare -a </B><I>name</I>
|
||||
|
||||
(see
|
||||
@@ -2713,7 +2743,15 @@ greater than or equal to zero. To explicitly declare an array, use
|
||||
below).
|
||||
<B>declare -a </B><I>name</I>[<I>subscript</I>]
|
||||
|
||||
is also accepted; the <I>subscript</I> is ignored. Attributes may be
|
||||
is also accepted; the <I>subscript</I> is ignored.
|
||||
<P>
|
||||
|
||||
Associative arrays are created using
|
||||
<B>declare -A </B><I>name</I>.
|
||||
|
||||
<P>
|
||||
|
||||
Attributes may be
|
||||
specified for an array variable using the
|
||||
<B>declare</B>
|
||||
|
||||
@@ -2725,11 +2763,17 @@ builtins. Each attribute applies to all members of an array.
|
||||
|
||||
Arrays are assigned to using compound assignments of the form
|
||||
<I>name</I>=<B>(</B>value<I>1</I> ... value<I>n</I><B>)</B>, where each
|
||||
<I>value</I> is of the form [<I>subscript</I>]=<I>string</I>. Only
|
||||
<I>string</I> is required. If
|
||||
the optional brackets and subscript are supplied, that index is assigned to;
|
||||
<I>value</I> is of the form [<I>subscript</I>]=<I>string</I>.
|
||||
Indexed array assignments do not require the bracket and subscript.
|
||||
When assigning to indexed arrays, if the optional brackets and subscript
|
||||
are supplied, that index is assigned to;
|
||||
otherwise the index of the element assigned is the last index assigned
|
||||
to by the statement plus one. Indexing starts at zero.
|
||||
<P>
|
||||
|
||||
When assigning to an associative array, the subscript is required.
|
||||
<P>
|
||||
|
||||
This syntax is also accepted by the
|
||||
<B>declare</B>
|
||||
|
||||
@@ -2764,7 +2808,7 @@ above). ${#<I>name</I>[<I>subscript</I>]} expands to the length of
|
||||
${<I>name</I>[<I>subscript</I>]}. If <I>subscript</I> is <B>*</B> or
|
||||
<B>@</B>, the expansion is the number of elements in the array.
|
||||
Referencing an array variable without a subscript is equivalent to
|
||||
referencing element zero.
|
||||
referencing the array with a subscript of 0.
|
||||
<P>
|
||||
|
||||
The
|
||||
@@ -2790,7 +2834,11 @@ and
|
||||
builtins each accept a
|
||||
<B>-a</B>
|
||||
|
||||
option to specify an array. The
|
||||
option to specify an indexed array and a
|
||||
<B>-A</B>
|
||||
|
||||
option to specify an associative array.
|
||||
The
|
||||
<B>read</B>
|
||||
|
||||
builtin accepts a
|
||||
@@ -3166,11 +3214,13 @@ If <I>offset</I> evaluates to a number less than zero, the value
|
||||
is used as an offset from the end of the value of <I>parameter</I>.
|
||||
If <I>parameter</I> is <B>@</B>, the result is <I>length</I> positional
|
||||
parameters beginning at <I>offset</I>.
|
||||
If <I>parameter</I> is an array name indexed by @ or *,
|
||||
If <I>parameter</I> is an indexed array name subscripted by @ or *,
|
||||
the result is the <I>length</I>
|
||||
members of the array beginning with ${<I>parameter</I>[<I>offset</I>]}.
|
||||
A negative <I>offset</I> is taken relative to one greater than the maximum
|
||||
index of the specified array.
|
||||
Substring expansion applied to an associative array produces undefined
|
||||
results.
|
||||
Note that a negative offset must be separated from the colon by at least
|
||||
one space to avoid being confused with the :- expansion.
|
||||
Substring indexing is zero-based unless the positional parameters
|
||||
@@ -3331,6 +3381,45 @@ or
|
||||
|
||||
the substitution operation is applied to each member of the
|
||||
array in turn, and the expansion is the resultant list.
|
||||
<DT>${<I>parameter</I><B>^</B><I>pattern</I>}<DD>
|
||||
|
||||
<DT>${<I>parameter</I><B>^^</B><I>pattern</I>}<DD>
|
||||
<DT>${<I>parameter</I><B>,</B><I>pattern</I>}<DD>
|
||||
<DT>${<I>parameter</I><B>,,</B><I>pattern</I>}<DD>
|
||||
|
||||
This expansion modifies the case of alphabetic characters in <I>parameter</I>.
|
||||
The <I>pattern</I> is expanded to produce a pattern just as in
|
||||
pathname expansion.
|
||||
The <B>^</B> operator converts lowercase letters matching <I>pattern</I>
|
||||
to uppercase; the <B>,</B> operator converts matching uppercase letters
|
||||
to lowercase.
|
||||
The <B>^^</B> and <B>,,</B> expansions convert each matched character in the
|
||||
expanded value; the <B>^</B> and <B>,</B> expansions match and convert only
|
||||
the first character.
|
||||
If <I>pattern</I> is omitted, it is treated like a <B>?</B>, which matches
|
||||
every character.
|
||||
If
|
||||
<I>parameter</I>
|
||||
|
||||
is
|
||||
<B>@</B>
|
||||
|
||||
or
|
||||
<B>*</B>,
|
||||
|
||||
the case modification operation is applied to each positional
|
||||
parameter in turn, and the expansion is the resultant list.
|
||||
If
|
||||
<I>parameter</I>
|
||||
|
||||
is an array variable subscripted with
|
||||
<B>@</B>
|
||||
|
||||
or
|
||||
<B>*</B>,
|
||||
|
||||
the case modification operation is applied to each member of the
|
||||
array in turn, and the expansion is the resultant list.
|
||||
</DL>
|
||||
<A NAME="lbBB"> </A>
|
||||
<H4>Command Substitution</H4>
|
||||
@@ -5477,6 +5566,8 @@ The
|
||||
may be referenced using
|
||||
<B>%-</B>.
|
||||
|
||||
If there is only a single job, <B>%+</B> and <B>%-</B> can both be used
|
||||
to refer to that job.
|
||||
In output pertaining to jobs (e.g., the output of the
|
||||
<B>jobs</B>
|
||||
|
||||
@@ -5645,6 +5736,7 @@ the release of <B>bash</B>, version + patch level (e.g., 2.00.0)
|
||||
|
||||
<DD>
|
||||
the current working directory, with <B>$HOME</B> abbreviated with a tilde
|
||||
(uses the <B>$PROMPT_DIRTRIM</B> variable)
|
||||
<DT><B>\W</B>
|
||||
|
||||
<DD>
|
||||
@@ -8525,9 +8617,9 @@ must be >= 1. If
|
||||
is greater than the number of enclosing loops, the last enclosing loop
|
||||
(the ``top-level'' loop) is resumed.
|
||||
The return value is 0 unless <I>n</I> is not greater than or equal to 1.
|
||||
<DT><B>declare</B> [<B>-afFirtx</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
|
||||
<DT><B>declare</B> [<B>-aAfFirtx</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
|
||||
|
||||
<DT><B>typeset</B> [<B>-afFirtx</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
|
||||
<DT><B>typeset</B> [<B>-aAfFirtx</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
|
||||
|
||||
Declare variables and/or give them attributes.
|
||||
If no <I>name</I>s are given then display the values of variables.
|
||||
@@ -8572,7 +8664,14 @@ to give variables attributes:
|
||||
<DT><B>-a</B>
|
||||
|
||||
<DD>
|
||||
Each <I>name</I> is an array variable (see
|
||||
Each <I>name</I> is an indexed array variable (see
|
||||
<B>Arrays</B>
|
||||
|
||||
above).
|
||||
<DT><B>-A</B>
|
||||
|
||||
<DD>
|
||||
Each <I>name</I> is an associative array variable (see
|
||||
<B>Arrays</B>
|
||||
|
||||
above).
|
||||
@@ -9588,8 +9687,7 @@ is supplied, or
|
||||
|
||||
<DD>
|
||||
Exit a login shell.
|
||||
<DT><B>mapfile</B> [<B>-n</B> <I>count</I>] [<B>-O</B> <I>origin</I>] [<B>-s</B> <I>cou<DD>
|
||||
nt</I>] [<B>-t</B>] [<B>-u</B> <I>fd</I>] [<B>-C</B> <I>callback</I>] [<B>-c</B> Iquantum] [<I>array</I>]
|
||||
<DT><B>mapfile</B> [<B>-n</B> <I>count</I>] [<B>-O</B> <I>origin</I>] [<B>-s</B> <I>count</I>] [<B>-t</B>] [<B>-u</B> <I>fd</I>] [<B>-C</B> <I>callback</I>] [<B>-c</B> <I>quantum</I>] [<I>array</I>]<DD>
|
||||
Read lines from the standard input into array variable
|
||||
<I>array</I>,
|
||||
|
||||
@@ -9834,7 +9932,7 @@ option is used, the pathname printed may contain symbolic links.
|
||||
The return status is 0 unless an error occurs while
|
||||
reading the name of the current directory or an
|
||||
invalid option is supplied.
|
||||
<DT><B>read</B> [<B>-ers</B>] [<B>-a</B> <I>aname</I>] [<B>-d</B> <I>delim</I>] [- <I>text</I>] [<B>-n</B> <I>nchars</I>] [<B>-p</B> <I>prompt</I>] [<B>-t</B> <I>timeout</I>] [<B>-u</B> <I>fd</I>] [<I>name</I> ...]<DD>
|
||||
<DT><B>read</B> [<B>-ers</B>] [<B>-a</B> <I>aname</I>] [<B>-d</B> <I>delim</I>] [<B>-</B> <I>text</I>] [<B>-n</B> <I>nchars</I>] [<B>-p</B> <I>prompt</I>] [<B>-t</B> <I>timeout</I>] [<B>-u</B> <I>fd</I>] [<I>name</I> ...]<DD>
|
||||
One line is read from the standard input, or from the file descriptor
|
||||
<I>fd</I> supplied as an argument to the <B>-u</B> option, and the first word
|
||||
is assigned to the first
|
||||
@@ -9927,8 +10025,10 @@ Cause <B>read</B> to time out and return failure if a complete line of
|
||||
input is not read within <I>timeout</I> seconds.
|
||||
<I>timeout</I> may be a decimal number with a fractional portion following
|
||||
the decimal point.
|
||||
This option has no effect if <B>read</B> is not reading input from the
|
||||
terminal or a pipe.
|
||||
This option is only effective if <B>read</B> is reading input from a
|
||||
terminal, pipe, or other special file; it has no effect when reading
|
||||
from regular files.
|
||||
The exit status is greater than 128 if the timeout is exceeded.
|
||||
<DT><B>-u </B><I>fd</I>
|
||||
|
||||
<DD>
|
||||
@@ -9949,7 +10049,7 @@ times out, or an invalid file descriptor is supplied as the argument to
|
||||
<B>-u</B>.
|
||||
</DL>
|
||||
|
||||
<DT><B>readonly</B> [<B>-apf</B>] [<I>name</I>[=<I>word</I>] ...]<DD>
|
||||
<DT><B>readonly</B> [<B>-aApf</B>] [<I>name</I>[=<I>word</I>] ...]<DD>
|
||||
|
||||
The given
|
||||
<I>names</I> are marked readonly; the values of these
|
||||
@@ -9965,7 +10065,10 @@ marked.
|
||||
The
|
||||
<B>-a</B>
|
||||
|
||||
option restricts the variables to arrays.
|
||||
option restricts the variables to indexed arrays; the
|
||||
<B>-A</B>
|
||||
|
||||
option restricts the variables to associative arrays.
|
||||
If no
|
||||
<I>name</I>
|
||||
|
||||
@@ -10925,12 +11028,11 @@ Suspend the execution of this shell until it receives a
|
||||
<FONT SIZE=-1><B>SIGCONT</B>
|
||||
|
||||
</FONT>
|
||||
signal. The
|
||||
signal. A login shell cannot be suspended; the
|
||||
<B>-f</B>
|
||||
|
||||
option says not to complain if this is
|
||||
a login shell; just suspend anyway. The return status is 0 unless
|
||||
the shell is a login shell and
|
||||
option can be used to override this and force the suspension.
|
||||
The return status is 0 unless the shell is a login shell and
|
||||
<B>-f</B>
|
||||
|
||||
is not supplied, or if job control is not enabled.
|
||||
@@ -11823,7 +11925,7 @@ Array variables may not (yet) be exported.
|
||||
<HR>
|
||||
<TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash-4.0<TH ALIGN=CENTER width=33%>2008 May 25<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash-4.0<TH ALIGN=CENTER width=33%>2008 June 29<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<HR>
|
||||
@@ -11928,6 +12030,6 @@ Array variables may not (yet) be exported.
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by man2html from bash.1.<BR>
|
||||
Time: 29 May 2008 11:48:48 EDT
|
||||
Time: 02 July 2008 09:08:29 EDT
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
Binary file not shown.
+5945
-5848
File diff suppressed because it is too large
Load Diff
+9
-9
@@ -92,16 +92,16 @@
|
||||
@xrdef{Command Substitution-pg}{22}
|
||||
@xrdef{Command Substitution-snt}{Section@tie 3.5.4}
|
||||
@xrdef{Arithmetic Expansion-title}{Arithmetic Expansion}
|
||||
@xrdef{Arithmetic Expansion-pg}{22}
|
||||
@xrdef{Arithmetic Expansion-pg}{23}
|
||||
@xrdef{Arithmetic Expansion-snt}{Section@tie 3.5.5}
|
||||
@xrdef{Process Substitution-title}{Process Substitution}
|
||||
@xrdef{Process Substitution-pg}{22}
|
||||
@xrdef{Process Substitution-pg}{23}
|
||||
@xrdef{Process Substitution-snt}{Section@tie 3.5.6}
|
||||
@xrdef{Word Splitting-title}{Word Splitting}
|
||||
@xrdef{Word Splitting-pg}{23}
|
||||
@xrdef{Word Splitting-snt}{Section@tie 3.5.7}
|
||||
@xrdef{Filename Expansion-title}{Filename Expansion}
|
||||
@xrdef{Filename Expansion-pg}{23}
|
||||
@xrdef{Filename Expansion-pg}{24}
|
||||
@xrdef{Filename Expansion-snt}{Section@tie 3.5.8}
|
||||
@xrdef{Pattern Matching-title}{Pattern Matching}
|
||||
@xrdef{Pattern Matching-pg}{24}
|
||||
@@ -110,7 +110,7 @@
|
||||
@xrdef{Quote Removal-pg}{25}
|
||||
@xrdef{Quote Removal-snt}{Section@tie 3.5.9}
|
||||
@xrdef{Redirections-title}{Redirections}
|
||||
@xrdef{Redirections-pg}{25}
|
||||
@xrdef{Redirections-pg}{26}
|
||||
@xrdef{Redirections-snt}{Section@tie 3.6}
|
||||
@xrdef{Executing Commands-title}{Executing Commands}
|
||||
@xrdef{Executing Commands-pg}{29}
|
||||
@@ -122,16 +122,16 @@
|
||||
@xrdef{Command Search and Execution-pg}{30}
|
||||
@xrdef{Command Search and Execution-snt}{Section@tie 3.7.2}
|
||||
@xrdef{Command Execution Environment-title}{Command Execution Environment}
|
||||
@xrdef{Command Execution Environment-pg}{30}
|
||||
@xrdef{Command Execution Environment-pg}{31}
|
||||
@xrdef{Command Execution Environment-snt}{Section@tie 3.7.3}
|
||||
@xrdef{Environment-title}{Environment}
|
||||
@xrdef{Environment-pg}{31}
|
||||
@xrdef{Environment-pg}{32}
|
||||
@xrdef{Environment-snt}{Section@tie 3.7.4}
|
||||
@xrdef{Exit Status-title}{Exit Status}
|
||||
@xrdef{Exit Status-pg}{32}
|
||||
@xrdef{Exit Status-snt}{Section@tie 3.7.5}
|
||||
@xrdef{Signals-title}{Signals}
|
||||
@xrdef{Signals-pg}{32}
|
||||
@xrdef{Signals-pg}{33}
|
||||
@xrdef{Signals-snt}{Section@tie 3.7.6}
|
||||
@xrdef{Shell Scripts-title}{Shell Scripts}
|
||||
@xrdef{Shell Scripts-pg}{33}
|
||||
@@ -203,7 +203,7 @@
|
||||
@xrdef{The Directory Stack-pg}{79}
|
||||
@xrdef{The Directory Stack-snt}{Section@tie 6.8}
|
||||
@xrdef{Directory Stack Builtins-title}{Directory Stack Builtins}
|
||||
@xrdef{Directory Stack Builtins-pg}{79}
|
||||
@xrdef{Directory Stack Builtins-pg}{80}
|
||||
@xrdef{Directory Stack Builtins-snt}{Section@tie 6.8.1}
|
||||
@xrdef{Printing a Prompt-title}{Controlling the Prompt}
|
||||
@xrdef{Printing a Prompt-pg}{81}
|
||||
@@ -212,7 +212,7 @@
|
||||
@xrdef{The Restricted Shell-pg}{82}
|
||||
@xrdef{The Restricted Shell-snt}{Section@tie 6.10}
|
||||
@xrdef{Bash POSIX Mode-title}{Bash POSIX Mode}
|
||||
@xrdef{Bash POSIX Mode-pg}{82}
|
||||
@xrdef{Bash POSIX Mode-pg}{83}
|
||||
@xrdef{Bash POSIX Mode-snt}{Section@tie 6.11}
|
||||
@xrdef{Job Control-title}{Job Control}
|
||||
@xrdef{Job Control-pg}{87}
|
||||
|
||||
+3
-3
@@ -17,7 +17,7 @@
|
||||
\entry{[}{39}{\code {[}}
|
||||
\entry{times}{40}{\code {times}}
|
||||
\entry{trap}{40}{\code {trap}}
|
||||
\entry{umask}{40}{\code {umask}}
|
||||
\entry{umask}{41}{\code {umask}}
|
||||
\entry{unset}{41}{\code {unset}}
|
||||
\entry{alias}{41}{\code {alias}}
|
||||
\entry{bind}{41}{\code {bind}}
|
||||
@@ -32,7 +32,7 @@
|
||||
\entry{local}{46}{\code {local}}
|
||||
\entry{logout}{46}{\code {logout}}
|
||||
\entry{mapfile}{46}{\code {mapfile}}
|
||||
\entry{printf}{46}{\code {printf}}
|
||||
\entry{printf}{47}{\code {printf}}
|
||||
\entry{read}{47}{\code {read}}
|
||||
\entry{source}{48}{\code {source}}
|
||||
\entry{type}{48}{\code {type}}
|
||||
@@ -41,7 +41,7 @@
|
||||
\entry{unalias}{50}{\code {unalias}}
|
||||
\entry{set}{50}{\code {set}}
|
||||
\entry{shopt}{54}{\code {shopt}}
|
||||
\entry{dirs}{79}{\code {dirs}}
|
||||
\entry{dirs}{80}{\code {dirs}}
|
||||
\entry{popd}{80}{\code {popd}}
|
||||
\entry{pushd}{80}{\code {pushd}}
|
||||
\entry{bg}{88}{\code {bg}}
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@
|
||||
\entry {\code {continue}}{36}
|
||||
\initial {D}
|
||||
\entry {\code {declare}}{43}
|
||||
\entry {\code {dirs}}{79}
|
||||
\entry {\code {dirs}}{80}
|
||||
\entry {\code {disown}}{89}
|
||||
\initial {E}
|
||||
\entry {\code {echo}}{44}
|
||||
@@ -51,7 +51,7 @@
|
||||
\entry {\code {mapfile}}{46}
|
||||
\initial {P}
|
||||
\entry {\code {popd}}{80}
|
||||
\entry {\code {printf}}{46}
|
||||
\entry {\code {printf}}{47}
|
||||
\entry {\code {pushd}}{80}
|
||||
\entry {\code {pwd}}{38}
|
||||
\initial {R}
|
||||
@@ -72,7 +72,7 @@
|
||||
\entry {\code {typeset}}{49}
|
||||
\initial {U}
|
||||
\entry {\code {ulimit}}{49}
|
||||
\entry {\code {umask}}{40}
|
||||
\entry {\code {umask}}{41}
|
||||
\entry {\code {unalias}}{50}
|
||||
\entry {\code {unset}}{41}
|
||||
\initial {W}
|
||||
|
||||
+12
-12
@@ -51,24 +51,24 @@
|
||||
\entry{parameter expansion}{19}{parameter expansion}
|
||||
\entry{expansion, parameter}{19}{expansion, parameter}
|
||||
\entry{command substitution}{22}{command substitution}
|
||||
\entry{expansion, arithmetic}{22}{expansion, arithmetic}
|
||||
\entry{arithmetic expansion}{22}{arithmetic expansion}
|
||||
\entry{process substitution}{22}{process substitution}
|
||||
\entry{expansion, arithmetic}{23}{expansion, arithmetic}
|
||||
\entry{arithmetic expansion}{23}{arithmetic expansion}
|
||||
\entry{process substitution}{23}{process substitution}
|
||||
\entry{word splitting}{23}{word splitting}
|
||||
\entry{expansion, filename}{23}{expansion, filename}
|
||||
\entry{expansion, pathname}{23}{expansion, pathname}
|
||||
\entry{filename expansion}{23}{filename expansion}
|
||||
\entry{pathname expansion}{23}{pathname expansion}
|
||||
\entry{expansion, filename}{24}{expansion, filename}
|
||||
\entry{expansion, pathname}{24}{expansion, pathname}
|
||||
\entry{filename expansion}{24}{filename expansion}
|
||||
\entry{pathname expansion}{24}{pathname expansion}
|
||||
\entry{pattern matching}{24}{pattern matching}
|
||||
\entry{matching, pattern}{24}{matching, pattern}
|
||||
\entry{redirection}{25}{redirection}
|
||||
\entry{redirection}{26}{redirection}
|
||||
\entry{command expansion}{29}{command expansion}
|
||||
\entry{command execution}{30}{command execution}
|
||||
\entry{command search}{30}{command search}
|
||||
\entry{execution environment}{30}{execution environment}
|
||||
\entry{environment}{31}{environment}
|
||||
\entry{execution environment}{31}{execution environment}
|
||||
\entry{environment}{32}{environment}
|
||||
\entry{exit status}{32}{exit status}
|
||||
\entry{signal handling}{32}{signal handling}
|
||||
\entry{signal handling}{33}{signal handling}
|
||||
\entry{shell script}{33}{shell script}
|
||||
\entry{special builtin}{58}{special builtin}
|
||||
\entry{login shell}{71}{login shell}
|
||||
@@ -87,7 +87,7 @@
|
||||
\entry{directory stack}{79}{directory stack}
|
||||
\entry{prompting}{81}{prompting}
|
||||
\entry{restricted shell}{82}{restricted shell}
|
||||
\entry{POSIX Mode}{82}{POSIX Mode}
|
||||
\entry{POSIX Mode}{83}{POSIX Mode}
|
||||
\entry{job control}{87}{job control}
|
||||
\entry{foreground}{87}{foreground}
|
||||
\entry{background}{87}{background}
|
||||
|
||||
+12
-12
@@ -1,7 +1,7 @@
|
||||
\initial {A}
|
||||
\entry {alias expansion}{77}
|
||||
\entry {arithmetic evaluation}{76}
|
||||
\entry {arithmetic expansion}{22}
|
||||
\entry {arithmetic expansion}{23}
|
||||
\entry {arithmetic, shell}{76}
|
||||
\entry {arrays}{78}
|
||||
\initial {B}
|
||||
@@ -35,24 +35,24 @@
|
||||
\entry {directory stack}{79}
|
||||
\initial {E}
|
||||
\entry {editing command lines}{91}
|
||||
\entry {environment}{31}
|
||||
\entry {environment}{32}
|
||||
\entry {evaluation, arithmetic}{76}
|
||||
\entry {event designators}{122}
|
||||
\entry {execution environment}{30}
|
||||
\entry {execution environment}{31}
|
||||
\entry {exit status}{3, 32}
|
||||
\entry {expansion}{17}
|
||||
\entry {expansion, arithmetic}{22}
|
||||
\entry {expansion, arithmetic}{23}
|
||||
\entry {expansion, brace}{18}
|
||||
\entry {expansion, filename}{23}
|
||||
\entry {expansion, filename}{24}
|
||||
\entry {expansion, parameter}{19}
|
||||
\entry {expansion, pathname}{23}
|
||||
\entry {expansion, pathname}{24}
|
||||
\entry {expansion, tilde}{18}
|
||||
\entry {expressions, arithmetic}{76}
|
||||
\entry {expressions, conditional}{75}
|
||||
\initial {F}
|
||||
\entry {field}{3}
|
||||
\entry {filename}{3}
|
||||
\entry {filename expansion}{23}
|
||||
\entry {filename expansion}{24}
|
||||
\entry {foreground}{87}
|
||||
\entry {functions, shell}{14}
|
||||
\initial {H}
|
||||
@@ -91,14 +91,14 @@
|
||||
\entry {parameters}{15}
|
||||
\entry {parameters, positional}{16}
|
||||
\entry {parameters, special}{16}
|
||||
\entry {pathname expansion}{23}
|
||||
\entry {pathname expansion}{24}
|
||||
\entry {pattern matching}{24}
|
||||
\entry {pipeline}{8}
|
||||
\entry {POSIX}{3}
|
||||
\entry {POSIX Mode}{82}
|
||||
\entry {POSIX Mode}{83}
|
||||
\entry {process group}{3}
|
||||
\entry {process group ID}{3}
|
||||
\entry {process substitution}{22}
|
||||
\entry {process substitution}{23}
|
||||
\entry {programmable completion}{112}
|
||||
\entry {prompting}{81}
|
||||
\initial {Q}
|
||||
@@ -106,7 +106,7 @@
|
||||
\entry {quoting, ANSI}{6}
|
||||
\initial {R}
|
||||
\entry {Readline, how to use}{90}
|
||||
\entry {redirection}{25}
|
||||
\entry {redirection}{26}
|
||||
\entry {reserved word}{3}
|
||||
\entry {restricted shell}{82}
|
||||
\entry {return status}{3}
|
||||
@@ -117,7 +117,7 @@
|
||||
\entry {shell variable}{15}
|
||||
\entry {shell, interactive}{73}
|
||||
\entry {signal}{4}
|
||||
\entry {signal handling}{32}
|
||||
\entry {signal handling}{33}
|
||||
\entry {special builtin}{4, 58}
|
||||
\entry {startup files}{71}
|
||||
\entry {suspending jobs}{87}
|
||||
|
||||
Binary file not shown.
+915
-806
File diff suppressed because it is too large
Load Diff
+354
-275
@@ -1,10 +1,10 @@
|
||||
This is bashref.info, produced by makeinfo version 4.11 from
|
||||
/Users/chet/src/bash/src/doc/bashref.texi.
|
||||
/usr/homes/chet/src/bash/src/doc/bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in
|
||||
the Bash shell (version 4.0, 25 May 2008).
|
||||
the Bash shell (version 4.0, 29 June 2008).
|
||||
|
||||
This is Edition 4.0, last updated 25 May 2008, of `The GNU Bash
|
||||
This is Edition 4.0, last updated 29 June 2008, of `The GNU Bash
|
||||
Reference Manual', for `Bash', Version 4.0.
|
||||
|
||||
Copyright (C) 1988-2007 Free Software Foundation, Inc.
|
||||
@@ -38,9 +38,9 @@ Bash Features
|
||||
*************
|
||||
|
||||
This text is a brief description of the features that are present in
|
||||
the Bash shell (version 4.0, 25 May 2008).
|
||||
the Bash shell (version 4.0, 29 June 2008).
|
||||
|
||||
This is Edition 4.0, last updated 25 May 2008, of `The GNU Bash
|
||||
This is Edition 4.0, last updated 29 June 2008, of `The GNU Bash
|
||||
Reference Manual', for `Bash', Version 4.0.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -1064,8 +1064,10 @@ variable's current value, which is also evaluated. When `+=' is
|
||||
applied to an array variable using compound assignment (*note
|
||||
Arrays::), 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,
|
||||
VALUE is expanded and appended to the variable's value.
|
||||
the array's maximum index (for indexed arrays), or added as additional
|
||||
key-value pairs in an associative array. When applied to a
|
||||
string-valued variable, VALUE is expanded and appended to the
|
||||
variable's value.
|
||||
|
||||
|
||||
File: bashref.info, Node: Positional Parameters, Next: Special Parameters, Up: Shell Parameters
|
||||
@@ -1404,12 +1406,15 @@ if the colon is omitted, the operator tests only for existence.
|
||||
If OFFSET evaluates to a number less than zero, the value is used
|
||||
as an offset from the end of the value of PARAMETER. If PARAMETER
|
||||
is `@', the result is LENGTH positional parameters beginning at
|
||||
OFFSET. If PARAMETER is an array name indexed by `@' or `*', the
|
||||
result is the LENGTH members of the array beginning with
|
||||
`${PARAMETER[OFFSET]}'. A negative OFFSET 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.
|
||||
OFFSET. If PARAMETER is an indexed array name subscripted by `@'
|
||||
or `*', the result is the LENGTH members of the array beginning
|
||||
with `${PARAMETER[OFFSET]}'. A negative OFFSET is taken relative
|
||||
to one greater than the maximum index of the specified array.
|
||||
Substring expansion applied to an associative array produces
|
||||
undefined results.
|
||||
|
||||
Note that a negative offset must be separated from the colon by at
|
||||
least one space to avoid being confused with the `:-' expansion.
|
||||
Substring indexing is zero-based unless the positional parameters
|
||||
are used, in which case the indexing starts at 1 by default. If
|
||||
OFFSET is 0, and the positional parameters are used, `$@' is
|
||||
@@ -1482,6 +1487,25 @@ if the colon is omitted, the operator tests only for existence.
|
||||
member of the array in turn, and the expansion is the resultant
|
||||
list.
|
||||
|
||||
`${PARAMETER^PATTERN}'
|
||||
`${PARAMETER^^PATTERN}'
|
||||
`${PARAMETER,PATTERN}'
|
||||
`${PARAMETER,,PATTERN}'
|
||||
This expansion modifies the case of alphabetic characters in
|
||||
PARAMETER. The PATTERN is expanded to produce a pattern just as in
|
||||
pathname expansion. The `^' operator converts lowercase letters
|
||||
matching PATTERN to uppercase; the `,' operator converts matching
|
||||
uppercase letters to lowercase. The `^^' and `,,' expansions
|
||||
convert each matched character in the expanded value; the `^' and
|
||||
`,' expansions match and convert only the first character. If
|
||||
PATTERN is omitted, it is treated like a `?', which matches every
|
||||
character. If PARAMETER is `@' or `*', the case modification
|
||||
operation is applied to each positional parameter in turn, and the
|
||||
expansion is the resultant list. If PARAMETER is an array
|
||||
variable subscripted with `@' or `*', the case modification
|
||||
operation is applied to each member of the array in turn, and the
|
||||
expansion is the resultant list.
|
||||
|
||||
|
||||
|
||||
File: bashref.info, Node: Command Substitution, Next: Arithmetic Expansion, Prev: Shell Parameter Expansion, Up: Shell Expansions
|
||||
@@ -2506,19 +2530,20 @@ standard.
|
||||
current directory or an invalid option is supplied.
|
||||
|
||||
`readonly'
|
||||
readonly [-apf] [NAME[=VALUE]] ...
|
||||
readonly [-aApf] [NAME[=VALUE]] ...
|
||||
Mark each NAME as readonly. The values of these names may not be
|
||||
changed by subsequent assignment. If the `-f' option is supplied,
|
||||
each NAME refers to a shell function. The `-a' option means each
|
||||
NAME refers to an array variable. If no NAME arguments are given,
|
||||
or if the `-p' option is supplied, a list of all readonly names is
|
||||
printed. The `-p' option causes output to be displayed in a
|
||||
format that may be reused as input. If a variable name is
|
||||
followed by =VALUE, the value of the variable is set to VALUE.
|
||||
The return status is zero unless an invalid option is supplied,
|
||||
one of the NAME arguments is not a valid shell variable or
|
||||
function name, or the `-f' option is supplied with a name that is
|
||||
not a shell function.
|
||||
NAME refers to an indexed array variable; the `-A' option means
|
||||
each NAME refers to an associative array variable. If no NAME
|
||||
arguments are given, or if the `-p' option is supplied, a list of
|
||||
all readonly names is printed. The `-p' option causes output to
|
||||
be displayed in a format that may be reused as input. If a
|
||||
variable name is followed by =VALUE, the value of the variable is
|
||||
set to VALUE. The return status is zero unless an invalid option
|
||||
is supplied, one of the NAME arguments is not a valid shell
|
||||
variable or function name, or the `-f' option is supplied with a
|
||||
name that is not a shell function.
|
||||
|
||||
`return'
|
||||
return [N]
|
||||
@@ -2827,7 +2852,7 @@ POSIX standard.
|
||||
non-zero if not.
|
||||
|
||||
`declare'
|
||||
declare [-afFirtx] [-p] [NAME[=VALUE] ...]
|
||||
declare [-aAfFirtx] [-p] [NAME[=VALUE] ...]
|
||||
|
||||
Declare variables and give them attributes. If no NAMEs are
|
||||
given, then display the values of variables instead.
|
||||
@@ -2852,7 +2877,10 @@ POSIX standard.
|
||||
attributes or to give variables attributes:
|
||||
|
||||
`-a'
|
||||
Each NAME is an array variable (*note Arrays::).
|
||||
Each NAME is an indexed array variable (*note Arrays::).
|
||||
|
||||
`-A'
|
||||
Each NAME is an associative array variable (*note Arrays::).
|
||||
|
||||
`-f'
|
||||
Use function names only.
|
||||
@@ -3138,8 +3166,10 @@ POSIX standard.
|
||||
Cause `read' to time out and return failure if a complete
|
||||
line of input is not read within TIMEOUT seconds. TIMEOUT
|
||||
may be a decimal number with a fractional portion following
|
||||
the decimal point. This option has no effect if `read' is
|
||||
not reading input from the terminal or a pipe.
|
||||
the decimal point. This option is only effective if `read'
|
||||
is reading input from a terminal, pipe, or other special
|
||||
file; it has no effect when reading from regular files. The
|
||||
exit status is greater than 128 if the timeout is exceeded.
|
||||
|
||||
`-u FD'
|
||||
Read input from file descriptor FD.
|
||||
@@ -3937,6 +3967,13 @@ Variables::).
|
||||
differs from `$$' under certain circumstances, such as subshells
|
||||
that do not require Bash to be re-initialized.
|
||||
|
||||
`BASH_ALIASES'
|
||||
An associative array variable whose members correspond to the
|
||||
internal list of aliases as maintained by the `alias' builtin
|
||||
(*note Bourne Shell Builtins::). Elements added to this array
|
||||
appear in the alias list; unsetting array elements cause aliases
|
||||
to be removed from the alias list.
|
||||
|
||||
`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
|
||||
@@ -3957,6 +3994,13 @@ Variables::).
|
||||
The Shopt Builtin:: for a description of the `extdebug' option to
|
||||
the `shopt' builtin).
|
||||
|
||||
`BASH_CMDS'
|
||||
An associative array variable whose members correspond to the
|
||||
internal hash table of commands as maintained by the `hash' builtin
|
||||
(*note Bourne Shell Builtins::). Elements added to this array
|
||||
appear in the hash table; unsetting array elements cause commands
|
||||
to be removed from the hash table.
|
||||
|
||||
`BASH_COMMAND'
|
||||
The command currently being executed or about to be executed,
|
||||
unless the shell is executing a command as the result of a trap,
|
||||
@@ -4321,6 +4365,12 @@ Variables::).
|
||||
If set, the value is interpreted as a command to execute before
|
||||
the printing of each primary prompt (`$PS1').
|
||||
|
||||
`PROMPT_DIRTRIM'
|
||||
If set to a number greater than zero, the value is used as the
|
||||
number of trailing directory components to retain when expanding
|
||||
the `\w' and `\W' prompt string escapes (*note Printing a
|
||||
Prompt::). Characters removed are replaced with an ellipsis.
|
||||
|
||||
`PS3'
|
||||
The value of this variable is used as the prompt for the `select'
|
||||
command. If this variable is not set, the `select' command
|
||||
@@ -5125,14 +5175,16 @@ File: bashref.info, Node: Arrays, Next: The Directory Stack, Prev: Aliases,
|
||||
6.7 Arrays
|
||||
==========
|
||||
|
||||
Bash provides one-dimensional array variables. Any variable may be
|
||||
used as an array; the `declare' builtin will explicitly declare an
|
||||
array. There is no maximum limit on the size of an array, nor any
|
||||
requirement that members be indexed or assigned contiguously. Arrays
|
||||
are zero-based.
|
||||
Bash provides one-dimensional indexed and associative array variables.
|
||||
Any variable may be used as an indexed array; the `declare' builtin
|
||||
will explicitly declare an array. There is no maximum limit on the
|
||||
size of an array, nor any requirement that members be indexed or
|
||||
assigned contiguously. Indexed arrays are referenced using integers
|
||||
(including arithmetic expressions (*note Shell Arithmetic::) and are
|
||||
zero-based; associative arrays use arbitrary strings.
|
||||
|
||||
An array is created automatically if any variable is assigned to
|
||||
using the syntax
|
||||
An indexed array is created automatically if any variable is
|
||||
assigned to using the syntax
|
||||
name[SUBSCRIPT]=VALUE
|
||||
|
||||
The SUBSCRIPT is treated as an arithmetic expression that must evaluate
|
||||
@@ -5141,18 +5193,28 @@ array, use
|
||||
declare -a NAME
|
||||
The syntax
|
||||
declare -a NAME[SUBSCRIPT]
|
||||
is also accepted; the SUBSCRIPT is ignored. Attributes may be
|
||||
specified for an array variable using the `declare' and `readonly'
|
||||
builtins. Each attribute applies to all members of an array.
|
||||
is also accepted; the SUBSCRIPT is ignored.
|
||||
|
||||
Associative arrays are created using
|
||||
declare -A NAME.
|
||||
|
||||
Attributes may be specified for an array variable using the
|
||||
`declare' and `readonly' builtins. Each attribute applies to all
|
||||
members of an array.
|
||||
|
||||
Arrays are assigned to using compound assignments of the form
|
||||
name=(value1 ... valueN)
|
||||
where each VALUE is of the form `[[SUBSCRIPT]=]'STRING. If the
|
||||
optional subscript is supplied, that index is assigned to; otherwise
|
||||
the index of the element assigned is the last index assigned to by the
|
||||
statement plus one. Indexing starts at zero. This syntax is also
|
||||
accepted by the `declare' builtin. Individual array elements may be
|
||||
assigned to using the `name['SUBSCRIPT`]='VALUE syntax introduced above.
|
||||
where each VALUE is of the form `[SUBSCRIPT]='STRING. Indexed array
|
||||
assignments do not require the bracket and subscript. When assigning
|
||||
to indexed arrays, if the optional subscript is supplied, that index is
|
||||
assigned to; otherwise the index of the element assigned is the last
|
||||
index assigned to by the statement plus one. Indexing starts at zero.
|
||||
|
||||
When assigning to an associative array, the subscript is required.
|
||||
|
||||
This syntax is also accepted by the `declare' builtin. Individual
|
||||
array elements may be assigned to using the `name['SUBSCRIPT`]='VALUE
|
||||
syntax introduced above.
|
||||
|
||||
Any element of an array may be referenced using
|
||||
`${name['SUBSCRIPT`]}'. The braces are required to avoid conflicts
|
||||
@@ -5171,7 +5233,7 @@ expansion of the special parameters `@' and `*'.
|
||||
`${#name['SUBSCRIPT`]}' expands to the length of `${name['SUBSCRIPT`]}'.
|
||||
If SUBSCRIPT is `@' or `*', the expansion is the number of elements in
|
||||
the array. Referencing an array variable without a subscript is
|
||||
equivalent to referencing element zero.
|
||||
equivalent to referencing with a subscript of 0.
|
||||
|
||||
The `unset' builtin is used to destroy arrays. `unset'
|
||||
NAME[SUBSCRIPT] destroys the array element at index SUBSCRIPT. Care
|
||||
@@ -5180,11 +5242,12 @@ generation. `unset' NAME, where NAME is an array, removes the entire
|
||||
array. A subscript of `*' or `@' also removes the entire array.
|
||||
|
||||
The `declare', `local', and `readonly' builtins each accept a `-a'
|
||||
option to specify an array. The `read' builtin accepts a `-a' option
|
||||
to assign a list of words read from the standard input to an array, and
|
||||
can read values from the standard input into individual array elements.
|
||||
The `set' and `declare' builtins display array values in a way that
|
||||
allows them to be reused as input.
|
||||
option to specify an indexed array and a `-A' option to specify an
|
||||
associative array. The `read' builtin accepts a `-a' option to assign
|
||||
a list of words read from the standard input to an array, and can read
|
||||
values from the standard input into individual array elements. The
|
||||
`set' and `declare' builtins display array values in a way that allows
|
||||
them to be reused as input.
|
||||
|
||||
|
||||
File: bashref.info, Node: The Directory Stack, Next: Printing a Prompt, Prev: Arrays, Up: Bash Features
|
||||
@@ -5364,7 +5427,7 @@ which can appear in the prompt variables:
|
||||
|
||||
`\w'
|
||||
The current working directory, with `$HOME' abbreviated with a
|
||||
tilde.
|
||||
tilde (uses the `$PROMPT_DIRTRIM' variable).
|
||||
|
||||
`\W'
|
||||
The basename of `$PWD', with `$HOME' abbreviated with a tilde.
|
||||
@@ -5619,6 +5682,9 @@ startup files.
|
||||
interpret any arguments to `echo' as options. Each argument is
|
||||
displayed, after escape characters are converted.
|
||||
|
||||
42. The `ulimit' builtin uses a block size of 512 bytes for the `-c'
|
||||
and `-f' options.
|
||||
|
||||
|
||||
There is other POSIX behavior that Bash does not implement by
|
||||
default even when in POSIX mode. Specifically:
|
||||
@@ -5705,10 +5771,11 @@ character `%' introduces a job name.
|
||||
`%+' refer to the shell's notion of the current job, which is the last
|
||||
job stopped while it was in the foreground or started in the background.
|
||||
A single `%' (with no accompanying job specification) also refers to
|
||||
the current job. The previous job may be referenced using `%-'. In
|
||||
output pertaining to jobs (e.g., the output of the `jobs' command), the
|
||||
current job is always flagged with a `+', and the previous job with a
|
||||
`-'.
|
||||
the current job. The previous job may be referenced using `%-'. If
|
||||
there is only a single job, `%+' and `%-' can both be used to refer to
|
||||
that job. In output pertaining to jobs (e.g., the output of the `jobs'
|
||||
command), the current job is always flagged with a `+', and the
|
||||
previous job with a `-'.
|
||||
|
||||
A job may also be referred to using a prefix of the name used to
|
||||
start it, or using a substring that appears in its command line. For
|
||||
@@ -5833,8 +5900,8 @@ File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables,
|
||||
`suspend'
|
||||
suspend [-f]
|
||||
Suspend the execution of this shell until it receives a `SIGCONT'
|
||||
signal. The `-f' option means to suspend even if the shell is a
|
||||
login shell.
|
||||
signal. A login shell cannot be suspended; the `-f' option can be
|
||||
used to override this and force the suspension.
|
||||
|
||||
|
||||
When job control is not active, the `kill' and `wait' builtins do
|
||||
@@ -8270,6 +8337,15 @@ does not provide the necessary support.
|
||||
Include `csh'-like brace expansion ( `b{a,b}c' ==> `bac bbc' ).
|
||||
See *note Brace Expansion::, for a complete description.
|
||||
|
||||
`--enable-casemod-attributes'
|
||||
Include support for case-modifying attributes in the `declare'
|
||||
builtin and assignment statements. Variables with the UPPERCASE
|
||||
attribute, for example, will have their values converted to
|
||||
uppercase upon assignment.
|
||||
|
||||
`--enable-casemod-expansion'
|
||||
Include support for case-modifying word expansions.
|
||||
|
||||
`--enable-command-timing'
|
||||
Include support for recognizing `time' as a reserved word and for
|
||||
displaying timing statistics for the pipeline following `time'
|
||||
@@ -9246,7 +9322,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* :: Bourne Shell Builtins.
|
||||
(line 11)
|
||||
* [: Bourne Shell Builtins.
|
||||
(line 212)
|
||||
(line 213)
|
||||
* alias: Bash Builtins. (line 11)
|
||||
* bg: Job Control Builtins.
|
||||
(line 7)
|
||||
@@ -9271,8 +9347,8 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 7)
|
||||
* disown: Job Control Builtins.
|
||||
(line 83)
|
||||
* echo: Bash Builtins. (line 208)
|
||||
* enable: Bash Builtins. (line 260)
|
||||
* echo: Bash Builtins. (line 211)
|
||||
* enable: Bash Builtins. (line 263)
|
||||
* eval: Bourne Shell Builtins.
|
||||
(line 63)
|
||||
* exec: Bourne Shell Builtins.
|
||||
@@ -9289,50 +9365,50 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 103)
|
||||
* hash: Bourne Shell Builtins.
|
||||
(line 145)
|
||||
* help: Bash Builtins. (line 288)
|
||||
* help: Bash Builtins. (line 291)
|
||||
* history: Bash History Builtins.
|
||||
(line 39)
|
||||
* jobs: Job Control Builtins.
|
||||
(line 25)
|
||||
* kill: Job Control Builtins.
|
||||
(line 57)
|
||||
* let: Bash Builtins. (line 308)
|
||||
* local: Bash Builtins. (line 315)
|
||||
* logout: Bash Builtins. (line 325)
|
||||
* mapfile: Bash Builtins. (line 329)
|
||||
* let: Bash Builtins. (line 311)
|
||||
* local: Bash Builtins. (line 318)
|
||||
* logout: Bash Builtins. (line 328)
|
||||
* mapfile: Bash Builtins. (line 332)
|
||||
* popd: Directory Stack Builtins.
|
||||
(line 37)
|
||||
* printf: Bash Builtins. (line 370)
|
||||
* printf: Bash Builtins. (line 373)
|
||||
* pushd: Directory Stack Builtins.
|
||||
(line 58)
|
||||
* pwd: Bourne Shell Builtins.
|
||||
(line 163)
|
||||
* read: Bash Builtins. (line 395)
|
||||
* read: Bash Builtins. (line 398)
|
||||
* readonly: Bourne Shell Builtins.
|
||||
(line 172)
|
||||
* return: Bourne Shell Builtins.
|
||||
(line 187)
|
||||
(line 188)
|
||||
* set: The Set Builtin. (line 11)
|
||||
* shift: Bourne Shell Builtins.
|
||||
(line 200)
|
||||
(line 201)
|
||||
* shopt: The Shopt Builtin. (line 9)
|
||||
* source: Bash Builtins. (line 461)
|
||||
* source: Bash Builtins. (line 466)
|
||||
* suspend: Job Control Builtins.
|
||||
(line 94)
|
||||
* test: Bourne Shell Builtins.
|
||||
(line 212)
|
||||
(line 213)
|
||||
* times: Bourne Shell Builtins.
|
||||
(line 280)
|
||||
(line 281)
|
||||
* trap: Bourne Shell Builtins.
|
||||
(line 285)
|
||||
* type: Bash Builtins. (line 465)
|
||||
* typeset: Bash Builtins. (line 496)
|
||||
* ulimit: Bash Builtins. (line 502)
|
||||
(line 286)
|
||||
* type: Bash Builtins. (line 470)
|
||||
* typeset: Bash Builtins. (line 501)
|
||||
* ulimit: Bash Builtins. (line 507)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 326)
|
||||
* unalias: Bash Builtins. (line 588)
|
||||
(line 327)
|
||||
* unalias: Bash Builtins. (line 593)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 343)
|
||||
(line 344)
|
||||
* wait: Job Control Builtins.
|
||||
(line 73)
|
||||
|
||||
@@ -9399,17 +9475,19 @@ D.3 Parameter and Variable Index
|
||||
* auto_resume: Job Control Variables.
|
||||
(line 6)
|
||||
* BASH: Bash Variables. (line 13)
|
||||
* BASH_ARGC: Bash Variables. (line 21)
|
||||
* BASH_ARGV: Bash Variables. (line 31)
|
||||
* BASH_COMMAND: Bash Variables. (line 41)
|
||||
* BASH_ENV: Bash Variables. (line 46)
|
||||
* BASH_EXECUTION_STRING: Bash Variables. (line 52)
|
||||
* BASH_LINENO: Bash Variables. (line 55)
|
||||
* BASH_REMATCH: Bash Variables. (line 64)
|
||||
* BASH_SOURCE: Bash Variables. (line 72)
|
||||
* BASH_SUBSHELL: Bash Variables. (line 76)
|
||||
* BASH_VERSINFO: Bash Variables. (line 80)
|
||||
* BASH_VERSION: Bash Variables. (line 104)
|
||||
* BASH_ALIASES: Bash Variables. (line 21)
|
||||
* BASH_ARGC: Bash Variables. (line 28)
|
||||
* BASH_ARGV: Bash Variables. (line 38)
|
||||
* BASH_CMDS: Bash Variables. (line 48)
|
||||
* BASH_COMMAND: Bash Variables. (line 55)
|
||||
* BASH_ENV: Bash Variables. (line 60)
|
||||
* BASH_EXECUTION_STRING: Bash Variables. (line 66)
|
||||
* BASH_LINENO: Bash Variables. (line 69)
|
||||
* BASH_REMATCH: Bash Variables. (line 78)
|
||||
* BASH_SOURCE: Bash Variables. (line 86)
|
||||
* BASH_SUBSHELL: Bash Variables. (line 90)
|
||||
* BASH_VERSINFO: Bash Variables. (line 94)
|
||||
* BASH_VERSION: Bash Variables. (line 118)
|
||||
* BASHPID: Bash Variables. (line 16)
|
||||
* bell-style: Readline Init File Syntax.
|
||||
(line 38)
|
||||
@@ -9417,81 +9495,81 @@ D.3 Parameter and Variable Index
|
||||
(line 45)
|
||||
* CDPATH: Bourne Shell Variables.
|
||||
(line 9)
|
||||
* COLUMNS: Bash Variables. (line 107)
|
||||
* COLUMNS: Bash Variables. (line 121)
|
||||
* comment-begin: Readline Init File Syntax.
|
||||
(line 50)
|
||||
* COMP_CWORD: Bash Variables. (line 112)
|
||||
* COMP_KEY: Bash Variables. (line 141)
|
||||
* COMP_LINE: Bash Variables. (line 118)
|
||||
* COMP_POINT: Bash Variables. (line 123)
|
||||
* COMP_TYPE: Bash Variables. (line 131)
|
||||
* COMP_WORDBREAKS: Bash Variables. (line 145)
|
||||
* COMP_WORDS: Bash Variables. (line 151)
|
||||
* COMP_CWORD: Bash Variables. (line 126)
|
||||
* COMP_KEY: Bash Variables. (line 155)
|
||||
* COMP_LINE: Bash Variables. (line 132)
|
||||
* COMP_POINT: Bash Variables. (line 137)
|
||||
* COMP_TYPE: Bash Variables. (line 145)
|
||||
* COMP_WORDBREAKS: Bash Variables. (line 159)
|
||||
* COMP_WORDS: Bash Variables. (line 165)
|
||||
* completion-prefix-display-length: Readline Init File Syntax.
|
||||
(line 60)
|
||||
* completion-query-items: Readline Init File Syntax.
|
||||
(line 67)
|
||||
* COMPREPLY: Bash Variables. (line 158)
|
||||
* COMPREPLY: Bash Variables. (line 172)
|
||||
* convert-meta: Readline Init File Syntax.
|
||||
(line 77)
|
||||
* DIRSTACK: Bash Variables. (line 163)
|
||||
* DIRSTACK: Bash Variables. (line 177)
|
||||
* disable-completion: Readline Init File Syntax.
|
||||
(line 83)
|
||||
* editing-mode: Readline Init File Syntax.
|
||||
(line 88)
|
||||
* EMACS: Bash Variables. (line 173)
|
||||
* EMACS: Bash Variables. (line 187)
|
||||
* enable-keypad: Readline Init File Syntax.
|
||||
(line 94)
|
||||
* EUID: Bash Variables. (line 178)
|
||||
* EUID: Bash Variables. (line 192)
|
||||
* expand-tilde: Readline Init File Syntax.
|
||||
(line 99)
|
||||
* FCEDIT: Bash Variables. (line 182)
|
||||
* FIGNORE: Bash Variables. (line 186)
|
||||
* FUNCNAME: Bash Variables. (line 192)
|
||||
* GLOBIGNORE: Bash Variables. (line 201)
|
||||
* GROUPS: Bash Variables. (line 207)
|
||||
* histchars: Bash Variables. (line 213)
|
||||
* HISTCMD: Bash Variables. (line 228)
|
||||
* HISTCONTROL: Bash Variables. (line 233)
|
||||
* HISTFILE: Bash Variables. (line 249)
|
||||
* HISTFILESIZE: Bash Variables. (line 253)
|
||||
* HISTIGNORE: Bash Variables. (line 261)
|
||||
* FCEDIT: Bash Variables. (line 196)
|
||||
* FIGNORE: Bash Variables. (line 200)
|
||||
* FUNCNAME: Bash Variables. (line 206)
|
||||
* GLOBIGNORE: Bash Variables. (line 215)
|
||||
* GROUPS: Bash Variables. (line 221)
|
||||
* histchars: Bash Variables. (line 227)
|
||||
* HISTCMD: Bash Variables. (line 242)
|
||||
* HISTCONTROL: Bash Variables. (line 247)
|
||||
* HISTFILE: Bash Variables. (line 263)
|
||||
* HISTFILESIZE: Bash Variables. (line 267)
|
||||
* HISTIGNORE: Bash Variables. (line 275)
|
||||
* history-preserve-point: Readline Init File Syntax.
|
||||
(line 103)
|
||||
* history-size: Readline Init File Syntax.
|
||||
(line 109)
|
||||
* HISTSIZE: Bash Variables. (line 280)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 284)
|
||||
* HISTSIZE: Bash Variables. (line 294)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 298)
|
||||
* HOME: Bourne Shell Variables.
|
||||
(line 13)
|
||||
* horizontal-scroll-mode: Readline Init File Syntax.
|
||||
(line 114)
|
||||
* HOSTFILE: Bash Variables. (line 293)
|
||||
* HOSTNAME: Bash Variables. (line 304)
|
||||
* HOSTTYPE: Bash Variables. (line 307)
|
||||
* HOSTFILE: Bash Variables. (line 307)
|
||||
* HOSTNAME: Bash Variables. (line 318)
|
||||
* HOSTTYPE: Bash Variables. (line 321)
|
||||
* IFS: Bourne Shell Variables.
|
||||
(line 18)
|
||||
* IGNOREEOF: Bash Variables. (line 310)
|
||||
* IGNOREEOF: Bash Variables. (line 324)
|
||||
* input-meta: Readline Init File Syntax.
|
||||
(line 121)
|
||||
* INPUTRC: Bash Variables. (line 320)
|
||||
* INPUTRC: Bash Variables. (line 334)
|
||||
* isearch-terminators: Readline Init File Syntax.
|
||||
(line 128)
|
||||
* keymap: Readline Init File Syntax.
|
||||
(line 135)
|
||||
* LANG: Bash Variables. (line 324)
|
||||
* LC_ALL: Bash Variables. (line 328)
|
||||
* LC_COLLATE: Bash Variables. (line 332)
|
||||
* LC_CTYPE: Bash Variables. (line 339)
|
||||
* LANG: Bash Variables. (line 338)
|
||||
* LC_ALL: Bash Variables. (line 342)
|
||||
* LC_COLLATE: Bash Variables. (line 346)
|
||||
* LC_CTYPE: Bash Variables. (line 353)
|
||||
* LC_MESSAGES <1>: Locale Translation. (line 11)
|
||||
* LC_MESSAGES: Bash Variables. (line 344)
|
||||
* LC_NUMERIC: Bash Variables. (line 348)
|
||||
* LINENO: Bash Variables. (line 352)
|
||||
* LINES: Bash Variables. (line 356)
|
||||
* MACHTYPE: Bash Variables. (line 361)
|
||||
* LC_MESSAGES: Bash Variables. (line 358)
|
||||
* LC_NUMERIC: Bash Variables. (line 362)
|
||||
* LINENO: Bash Variables. (line 366)
|
||||
* LINES: Bash Variables. (line 370)
|
||||
* MACHTYPE: Bash Variables. (line 375)
|
||||
* MAIL: Bourne Shell Variables.
|
||||
(line 22)
|
||||
* MAILCHECK: Bash Variables. (line 365)
|
||||
* MAILCHECK: Bash Variables. (line 379)
|
||||
* MAILPATH: Bourne Shell Variables.
|
||||
(line 27)
|
||||
* mark-modified-lines: Readline Init File Syntax.
|
||||
@@ -9502,48 +9580,49 @@ D.3 Parameter and Variable Index
|
||||
(line 158)
|
||||
* meta-flag: Readline Init File Syntax.
|
||||
(line 121)
|
||||
* OLDPWD: Bash Variables. (line 373)
|
||||
* OLDPWD: Bash Variables. (line 387)
|
||||
* OPTARG: Bourne Shell Variables.
|
||||
(line 34)
|
||||
* OPTERR: Bash Variables. (line 376)
|
||||
* OPTERR: Bash Variables. (line 390)
|
||||
* OPTIND: Bourne Shell Variables.
|
||||
(line 38)
|
||||
* OSTYPE: Bash Variables. (line 380)
|
||||
* OSTYPE: Bash Variables. (line 394)
|
||||
* output-meta: Readline Init File Syntax.
|
||||
(line 165)
|
||||
* page-completions: Readline Init File Syntax.
|
||||
(line 170)
|
||||
* PATH: Bourne Shell Variables.
|
||||
(line 42)
|
||||
* PIPESTATUS: Bash Variables. (line 383)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 388)
|
||||
* PPID: Bash Variables. (line 397)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 401)
|
||||
* PIPESTATUS: Bash Variables. (line 397)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 402)
|
||||
* PPID: Bash Variables. (line 411)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 415)
|
||||
* PROMPT_DIRTRIM: Bash Variables. (line 419)
|
||||
* PS1: Bourne Shell Variables.
|
||||
(line 48)
|
||||
* PS2: Bourne Shell Variables.
|
||||
(line 53)
|
||||
* PS3: Bash Variables. (line 405)
|
||||
* PS4: Bash Variables. (line 410)
|
||||
* PWD: Bash Variables. (line 416)
|
||||
* RANDOM: Bash Variables. (line 419)
|
||||
* REPLY: Bash Variables. (line 424)
|
||||
* PS3: Bash Variables. (line 425)
|
||||
* PS4: Bash Variables. (line 430)
|
||||
* PWD: Bash Variables. (line 436)
|
||||
* RANDOM: Bash Variables. (line 439)
|
||||
* REPLY: Bash Variables. (line 444)
|
||||
* revert-all-at-newline: Readline Init File Syntax.
|
||||
(line 180)
|
||||
* SECONDS: Bash Variables. (line 427)
|
||||
* SHELL: Bash Variables. (line 433)
|
||||
* SHELLOPTS: Bash Variables. (line 438)
|
||||
* SHLVL: Bash Variables. (line 447)
|
||||
* SECONDS: Bash Variables. (line 447)
|
||||
* SHELL: Bash Variables. (line 453)
|
||||
* SHELLOPTS: Bash Variables. (line 458)
|
||||
* SHLVL: Bash Variables. (line 467)
|
||||
* show-all-if-ambiguous: Readline Init File Syntax.
|
||||
(line 186)
|
||||
* show-all-if-unmodified: Readline Init File Syntax.
|
||||
(line 192)
|
||||
* TEXTDOMAIN: Locale Translation. (line 11)
|
||||
* TEXTDOMAINDIR: Locale Translation. (line 11)
|
||||
* TIMEFORMAT: Bash Variables. (line 452)
|
||||
* TMOUT: Bash Variables. (line 490)
|
||||
* TMPDIR: Bash Variables. (line 502)
|
||||
* UID: Bash Variables. (line 506)
|
||||
* TIMEFORMAT: Bash Variables. (line 472)
|
||||
* TMOUT: Bash Variables. (line 510)
|
||||
* TMPDIR: Bash Variables. (line 522)
|
||||
* UID: Bash Variables. (line 526)
|
||||
* visible-stats: Readline Init File Syntax.
|
||||
(line 201)
|
||||
|
||||
@@ -9809,131 +9888,131 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top1338
|
||||
Node: Introduction3167
|
||||
Node: What is Bash?3395
|
||||
Node: What is a shell?4508
|
||||
Node: Definitions7048
|
||||
Node: Basic Shell Features9828
|
||||
Node: Shell Syntax11047
|
||||
Node: Shell Operation12077
|
||||
Node: Quoting13371
|
||||
Node: Escape Character14674
|
||||
Node: Single Quotes15159
|
||||
Node: Double Quotes15507
|
||||
Node: ANSI-C Quoting16632
|
||||
Node: Locale Translation17588
|
||||
Node: Comments18484
|
||||
Node: Shell Commands19102
|
||||
Node: Simple Commands19868
|
||||
Node: Pipelines20499
|
||||
Node: Lists22755
|
||||
Node: Compound Commands24484
|
||||
Node: Looping Constructs25268
|
||||
Node: Conditional Constructs27715
|
||||
Node: Command Grouping35721
|
||||
Node: Shell Functions37200
|
||||
Node: Shell Parameters41661
|
||||
Node: Positional Parameters43991
|
||||
Node: Special Parameters44891
|
||||
Node: Shell Expansions47855
|
||||
Node: Brace Expansion49780
|
||||
Node: Tilde Expansion52533
|
||||
Node: Shell Parameter Expansion54884
|
||||
Node: Command Substitution62584
|
||||
Node: Arithmetic Expansion63917
|
||||
Node: Process Substitution64767
|
||||
Node: Word Splitting65817
|
||||
Node: Filename Expansion67440
|
||||
Node: Pattern Matching69580
|
||||
Node: Quote Removal73219
|
||||
Node: Redirections73514
|
||||
Node: Executing Commands81657
|
||||
Node: Simple Command Expansion82327
|
||||
Node: Command Search and Execution84257
|
||||
Node: Command Execution Environment86594
|
||||
Node: Environment89393
|
||||
Node: Exit Status91053
|
||||
Node: Signals92674
|
||||
Node: Shell Scripts94642
|
||||
Node: Shell Builtin Commands97160
|
||||
Node: Bourne Shell Builtins98837
|
||||
Node: Bash Builtins116067
|
||||
Node: Modifying Shell Behavior138853
|
||||
Node: The Set Builtin139198
|
||||
Node: The Shopt Builtin148046
|
||||
Node: Special Builtins158908
|
||||
Node: Shell Variables159887
|
||||
Node: Bourne Shell Variables160327
|
||||
Node: Bash Variables162308
|
||||
Node: Bash Features183680
|
||||
Node: Invoking Bash184563
|
||||
Node: Bash Startup Files190372
|
||||
Node: Interactive Shells195341
|
||||
Node: What is an Interactive Shell?195751
|
||||
Node: Is this Shell Interactive?196400
|
||||
Node: Interactive Shell Behavior197215
|
||||
Node: Bash Conditional Expressions200495
|
||||
Node: Shell Arithmetic204074
|
||||
Node: Aliases206820
|
||||
Node: Arrays209392
|
||||
Node: The Directory Stack212741
|
||||
Node: Directory Stack Builtins213455
|
||||
Node: Printing a Prompt216347
|
||||
Node: The Restricted Shell219061
|
||||
Node: Bash POSIX Mode220893
|
||||
Node: Job Control228652
|
||||
Node: Job Control Basics229112
|
||||
Node: Job Control Builtins233621
|
||||
Node: Job Control Variables237948
|
||||
Node: Command Line Editing239106
|
||||
Node: Introduction and Notation240101
|
||||
Node: Readline Interaction241723
|
||||
Node: Readline Bare Essentials242914
|
||||
Node: Readline Movement Commands244703
|
||||
Node: Readline Killing Commands245668
|
||||
Node: Readline Arguments247588
|
||||
Node: Searching248632
|
||||
Node: Readline Init File250818
|
||||
Node: Readline Init File Syntax251965
|
||||
Node: Conditional Init Constructs265199
|
||||
Node: Sample Init File267732
|
||||
Node: Bindable Readline Commands270849
|
||||
Node: Commands For Moving272056
|
||||
Node: Commands For History272917
|
||||
Node: Commands For Text276072
|
||||
Node: Commands For Killing278745
|
||||
Node: Numeric Arguments280887
|
||||
Node: Commands For Completion282026
|
||||
Node: Keyboard Macros285793
|
||||
Node: Miscellaneous Commands286364
|
||||
Node: Readline vi Mode291675
|
||||
Node: Programmable Completion292589
|
||||
Node: Programmable Completion Builtins298422
|
||||
Node: Using History Interactively306805
|
||||
Node: Bash History Facilities307489
|
||||
Node: Bash History Builtins310403
|
||||
Node: History Interaction314260
|
||||
Node: Event Designators316965
|
||||
Node: Word Designators317980
|
||||
Node: Modifiers319619
|
||||
Node: Installing Bash321023
|
||||
Node: Basic Installation322160
|
||||
Node: Compilers and Options324852
|
||||
Node: Compiling For Multiple Architectures325593
|
||||
Node: Installation Names327257
|
||||
Node: Specifying the System Type328075
|
||||
Node: Sharing Defaults328791
|
||||
Node: Operation Controls329464
|
||||
Node: Optional Features330422
|
||||
Node: Reporting Bugs339353
|
||||
Node: Major Differences From The Bourne Shell340547
|
||||
Node: GNU Free Documentation License357234
|
||||
Node: Indexes379695
|
||||
Node: Builtin Index380149
|
||||
Node: Reserved Word Index386903
|
||||
Node: Variable Index389351
|
||||
Node: Function Index400938
|
||||
Node: Concept Index407670
|
||||
Node: Top1344
|
||||
Node: Introduction3175
|
||||
Node: What is Bash?3403
|
||||
Node: What is a shell?4516
|
||||
Node: Definitions7056
|
||||
Node: Basic Shell Features9836
|
||||
Node: Shell Syntax11055
|
||||
Node: Shell Operation12085
|
||||
Node: Quoting13379
|
||||
Node: Escape Character14682
|
||||
Node: Single Quotes15167
|
||||
Node: Double Quotes15515
|
||||
Node: ANSI-C Quoting16640
|
||||
Node: Locale Translation17596
|
||||
Node: Comments18492
|
||||
Node: Shell Commands19110
|
||||
Node: Simple Commands19876
|
||||
Node: Pipelines20507
|
||||
Node: Lists22763
|
||||
Node: Compound Commands24492
|
||||
Node: Looping Constructs25276
|
||||
Node: Conditional Constructs27723
|
||||
Node: Command Grouping35729
|
||||
Node: Shell Functions37208
|
||||
Node: Shell Parameters41669
|
||||
Node: Positional Parameters44085
|
||||
Node: Special Parameters44985
|
||||
Node: Shell Expansions47949
|
||||
Node: Brace Expansion49874
|
||||
Node: Tilde Expansion52627
|
||||
Node: Shell Parameter Expansion54978
|
||||
Node: Command Substitution63809
|
||||
Node: Arithmetic Expansion65142
|
||||
Node: Process Substitution65992
|
||||
Node: Word Splitting67042
|
||||
Node: Filename Expansion68665
|
||||
Node: Pattern Matching70805
|
||||
Node: Quote Removal74444
|
||||
Node: Redirections74739
|
||||
Node: Executing Commands82882
|
||||
Node: Simple Command Expansion83552
|
||||
Node: Command Search and Execution85482
|
||||
Node: Command Execution Environment87819
|
||||
Node: Environment90618
|
||||
Node: Exit Status92278
|
||||
Node: Signals93899
|
||||
Node: Shell Scripts95867
|
||||
Node: Shell Builtin Commands98385
|
||||
Node: Bourne Shell Builtins100062
|
||||
Node: Bash Builtins117380
|
||||
Node: Modifying Shell Behavior140408
|
||||
Node: The Set Builtin140753
|
||||
Node: The Shopt Builtin149601
|
||||
Node: Special Builtins160463
|
||||
Node: Shell Variables161442
|
||||
Node: Bourne Shell Variables161882
|
||||
Node: Bash Variables163863
|
||||
Node: Bash Features186181
|
||||
Node: Invoking Bash187064
|
||||
Node: Bash Startup Files192873
|
||||
Node: Interactive Shells197842
|
||||
Node: What is an Interactive Shell?198252
|
||||
Node: Is this Shell Interactive?198901
|
||||
Node: Interactive Shell Behavior199716
|
||||
Node: Bash Conditional Expressions202996
|
||||
Node: Shell Arithmetic206575
|
||||
Node: Aliases209321
|
||||
Node: Arrays211893
|
||||
Node: The Directory Stack215735
|
||||
Node: Directory Stack Builtins216449
|
||||
Node: Printing a Prompt219341
|
||||
Node: The Restricted Shell222093
|
||||
Node: Bash POSIX Mode223925
|
||||
Node: Job Control231778
|
||||
Node: Job Control Basics232238
|
||||
Node: Job Control Builtins236832
|
||||
Node: Job Control Variables241196
|
||||
Node: Command Line Editing242354
|
||||
Node: Introduction and Notation243349
|
||||
Node: Readline Interaction244971
|
||||
Node: Readline Bare Essentials246162
|
||||
Node: Readline Movement Commands247951
|
||||
Node: Readline Killing Commands248916
|
||||
Node: Readline Arguments250836
|
||||
Node: Searching251880
|
||||
Node: Readline Init File254066
|
||||
Node: Readline Init File Syntax255213
|
||||
Node: Conditional Init Constructs268447
|
||||
Node: Sample Init File270980
|
||||
Node: Bindable Readline Commands274097
|
||||
Node: Commands For Moving275304
|
||||
Node: Commands For History276165
|
||||
Node: Commands For Text279320
|
||||
Node: Commands For Killing281993
|
||||
Node: Numeric Arguments284135
|
||||
Node: Commands For Completion285274
|
||||
Node: Keyboard Macros289041
|
||||
Node: Miscellaneous Commands289612
|
||||
Node: Readline vi Mode294923
|
||||
Node: Programmable Completion295837
|
||||
Node: Programmable Completion Builtins301670
|
||||
Node: Using History Interactively310053
|
||||
Node: Bash History Facilities310737
|
||||
Node: Bash History Builtins313651
|
||||
Node: History Interaction317508
|
||||
Node: Event Designators320213
|
||||
Node: Word Designators321228
|
||||
Node: Modifiers322867
|
||||
Node: Installing Bash324271
|
||||
Node: Basic Installation325408
|
||||
Node: Compilers and Options328100
|
||||
Node: Compiling For Multiple Architectures328841
|
||||
Node: Installation Names330505
|
||||
Node: Specifying the System Type331323
|
||||
Node: Sharing Defaults332039
|
||||
Node: Operation Controls332712
|
||||
Node: Optional Features333670
|
||||
Node: Reporting Bugs342954
|
||||
Node: Major Differences From The Bourne Shell344148
|
||||
Node: GNU Free Documentation License360835
|
||||
Node: Indexes383296
|
||||
Node: Builtin Index383750
|
||||
Node: Reserved Word Index390504
|
||||
Node: Variable Index392952
|
||||
Node: Function Index404758
|
||||
Node: Concept Index411490
|
||||
|
||||
End Tag Table
|
||||
|
||||
+22
-22
@@ -1,6 +1,6 @@
|
||||
This is TeX, Version 3.141592 (Web2C 7.5.4) (format=tex 2008.4.8) 29 MAY 2008 11:48
|
||||
**/Users/chet/src/bash/src/doc/bashref.texi
|
||||
(/Users/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
|
||||
This is TeX, Version 3.141592 (Web2C 7.5.4) (format=tex 2008.4.8) 2 JUL 2008 09:08
|
||||
**/usr/homes/chet/src/bash/src/doc/bashref.texi
|
||||
(/usr/homes/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
|
||||
Loading texinfo [version 2003-02-03.16]: Basics,
|
||||
\bindingoffset=\dimen16
|
||||
\normaloffset=\dimen17
|
||||
@@ -173,7 +173,7 @@ textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[][]
|
||||
[11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25]
|
||||
[26] [27] [28] [29] [30] [31] [32] [33] Chapter 4 [34] [35] [36] [37] [38]
|
||||
[39] [40] [41]
|
||||
Underfull \hbox (badness 5231) in paragraph at lines 3194--3207
|
||||
Underfull \hbox (badness 5231) in paragraph at lines 3223--3236
|
||||
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
|
||||
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
|
||||
|
||||
@@ -186,7 +186,7 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
|
||||
.etc.
|
||||
|
||||
[42] [43] [44] [45] [46]
|
||||
Overfull \hbox (102.08961pt too wide) in paragraph at lines 3602--3602
|
||||
Overfull \hbox (102.08961pt too wide) in paragraph at lines 3634--3634
|
||||
[]@texttt read [-ers] [-a @textttsl aname@texttt ] [-d @textttsl de-lim@texttt
|
||||
] [-i @textttsl text@texttt ] [-n @textttsl nchars@texttt ] [-p @textttsl prom
|
||||
pt@texttt ] [-t @textttsl time-
|
||||
@@ -199,8 +199,8 @@ pt@texttt ] [-t @textttsl time-
|
||||
.@texttt a
|
||||
.etc.
|
||||
|
||||
[47] [48] [49] [50] [51] [52] [53] [54]
|
||||
Underfull \hbox (badness 2573) in paragraph at lines 4251--4255
|
||||
[47] [48] [49] [50] [51] [52] [53] [54] [55]
|
||||
Underfull \hbox (badness 2573) in paragraph at lines 4285--4289
|
||||
[] []@textrm Error trac-ing is en-abled: com-mand sub-sti-tu-tion, shell
|
||||
|
||||
@hbox(7.60416+2.12917)x433.62, glue set 2.95305
|
||||
@@ -215,9 +215,9 @@ Underfull \hbox (badness 2573) in paragraph at lines 4251--4255
|
||||
.@textrm E
|
||||
.etc.
|
||||
|
||||
[55] [56] [57] Chapter 5 [58] [59] [60] [61] [62] [63] [64] [65] [66]
|
||||
Chapter 6 [67] [68]
|
||||
Overfull \hbox (51.96864pt too wide) in paragraph at lines 5074--5074
|
||||
[56] [57] Chapter 5 [58] [59] [60] [61] [62] [63] [64] [65] [66] Chapter 6
|
||||
[67] [68]
|
||||
Overfull \hbox (51.96864pt too wide) in paragraph at lines 5128--5128
|
||||
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
|
||||
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
|
||||
@@ -230,7 +230,7 @@ exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (76.23077pt too wide) in paragraph at lines 5075--5075
|
||||
Overfull \hbox (76.23077pt too wide) in paragraph at lines 5129--5129
|
||||
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
|
||||
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
|
||||
-
|
||||
@@ -244,7 +244,7 @@ Overfull \hbox (76.23077pt too wide) in paragraph at lines 5075--5075
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (34.72258pt too wide) in paragraph at lines 5076--5076
|
||||
Overfull \hbox (34.72258pt too wide) in paragraph at lines 5130--5130
|
||||
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
|
||||
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
|
||||
@@ -257,7 +257,7 @@ tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
.etc.
|
||||
|
||||
[69] [70]
|
||||
Underfull \hbox (badness 2245) in paragraph at lines 5250--5252
|
||||
Underfull \hbox (badness 2245) in paragraph at lines 5304--5306
|
||||
[]@textrm When a lo-gin shell ex-its, Bash reads and ex-e-cutes com-mands from
|
||||
the file
|
||||
|
||||
@@ -270,7 +270,7 @@ the file
|
||||
.etc.
|
||||
|
||||
[71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84]
|
||||
Underfull \hbox (badness 2521) in paragraph at lines 6366--6369
|
||||
Underfull \hbox (badness 2521) in paragraph at lines 6441--6444
|
||||
@textrm `@texttt --enable-strict-posix-default[]@textrm '[] to @texttt configur
|
||||
e[] @textrm when build-ing (see Sec-tion 10.8
|
||||
|
||||
@@ -283,8 +283,8 @@ e[] @textrm when build-ing (see Sec-tion 10.8
|
||||
.etc.
|
||||
|
||||
Chapter 7 [85] [86] [87] [88] [89]
|
||||
(/Users/chet/src/bash/src/lib/readline/doc/rluser.texi Chapter 8 [90] [91]
|
||||
[92] [93] [94] [95] [96]
|
||||
(/usr/homes/chet/src/bash/src/lib/readline/doc/rluser.texi Chapter 8 [90]
|
||||
[91] [92] [93] [94] [95] [96]
|
||||
Underfull \hbox (badness 5231) in paragraph at lines 514--530
|
||||
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
|
||||
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
|
||||
@@ -323,10 +323,10 @@ Underfull \hbox (badness 2753) in paragraph at lines 1795--1798
|
||||
.@texttt o
|
||||
.etc.
|
||||
|
||||
[116]) (/Users/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
|
||||
[116]) (/usr/homes/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
|
||||
[117] [118] [119] [120] [121] [122]) Chapter 10 [123] [124] [125] [126]
|
||||
[127]
|
||||
Underfull \hbox (badness 2772) in paragraph at lines 6962--6966
|
||||
Underfull \hbox (badness 2772) in paragraph at lines 7040--7044
|
||||
[]@textrm Enable sup-port for large files (@texttt http://www.sas.com/standard
|
||||
s/large_
|
||||
|
||||
@@ -345,11 +345,11 @@ s/large_
|
||||
[155] [156] )
|
||||
Here is how much of TeX's memory you used:
|
||||
1732 strings out of 97980
|
||||
23635 string characters out of 1221006
|
||||
51884 words of memory out of 1500000
|
||||
23667 string characters out of 1221006
|
||||
51886 words of memory out of 1500000
|
||||
2583 multiletter control sequences out of 10000+50000
|
||||
31953 words of font info for 111 fonts, out of 1200000 for 2000
|
||||
19 hyphenation exceptions out of 8191
|
||||
15i,8n,11p,269b,471s stack positions out of 5000i,500n,6000p,200000b,5000s
|
||||
15i,8n,11p,273b,471s stack positions out of 5000i,500n,6000p,200000b,5000s
|
||||
|
||||
Output written on bashref.dvi (162 pages, 624132 bytes).
|
||||
Output written on bashref.dvi (162 pages, 629552 bytes).
|
||||
|
||||
Binary file not shown.
+3096
-2984
File diff suppressed because it is too large
Load Diff
+97
-16
@@ -16,7 +16,7 @@ This is Edition @value{EDITION}, last updated @value{UPDATED},
|
||||
of @cite{The GNU Bash Reference Manual},
|
||||
for @code{Bash}, Version @value{VERSION}.
|
||||
|
||||
Copyright @copyright{} 1988--2007 Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1988--2008 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
@@ -584,6 +584,7 @@ some other grouping.
|
||||
commands.
|
||||
* Lists:: How to execute commands sequentially.
|
||||
* Compound Commands:: Shell commands for control flow.
|
||||
* Coprocesses:: Two-way communication between commands.
|
||||
@end menu
|
||||
|
||||
@node Simple Commands
|
||||
@@ -1074,6 +1075,41 @@ from the @var{list} by whitespace.
|
||||
The exit status of both of these constructs is the exit status of
|
||||
@var{list}.
|
||||
|
||||
@node Coprocesses
|
||||
@subsection Coprocesses
|
||||
@cindex coprocess
|
||||
|
||||
A @code{coprocess} is a shell command preceded by the @code{coproc}
|
||||
reserved word.
|
||||
A coprocess is executed asynchronously in a subshell, as if the command
|
||||
had been terminated with the @samp{&} control operator, with a two-way pipe
|
||||
established between the executing shell and the coprocess.
|
||||
|
||||
The format for a coprocess is:
|
||||
@example
|
||||
@code{coproc} [@var{NAME}] @var{command} [@var{redirections}]
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
This creates a coprocess named @var{NAME}.
|
||||
If @var{NAME} is not supplied, the default name is @var{COPROC}.
|
||||
|
||||
When the coproc is executed, the shell creates an array variable
|
||||
(@pxref{Arrays})
|
||||
named @var{NAME} in the context of the executing shell.
|
||||
The standard output of @var{command}
|
||||
is connected via a pipe to a file descriptor in the executing shell,
|
||||
and that file descriptor is assigned to @var{NAME}[0].
|
||||
The standard input of @var{command}
|
||||
is connected via a pipe to a file descriptor in the executing shell,
|
||||
and that file descriptor is assigned to @var{NAME}[1].
|
||||
This pipe is established before any redirections specified by the
|
||||
command (@pxref{Redirections}).
|
||||
The file descriptors can be utilized as arguments to shell commands
|
||||
and redirections using standard word expansions.
|
||||
|
||||
The return status of a coprocess is the exit status of @var{command}.
|
||||
|
||||
@node Shell Functions
|
||||
@section Shell Functions
|
||||
@cindex shell function
|
||||
@@ -1620,11 +1656,14 @@ If @var{offset} evaluates to a number less than zero, the value
|
||||
is used as an offset from the end of the value of @var{parameter}.
|
||||
If @var{parameter} is @samp{@@}, the result is @var{length} positional
|
||||
parameters beginning at @var{offset}.
|
||||
If @var{parameter} is an array name indexed by @samp{@@} or @samp{*},
|
||||
the result is the @var{length}
|
||||
If @var{parameter} is an indexed array name subscripted
|
||||
by @samp{@@} or @samp{*}, the result is the @var{length}
|
||||
members of the array beginning with @code{$@{@var{parameter}[@var{offset}]@}}.
|
||||
A negative @var{offset} is taken relative to one greater than the maximum
|
||||
index of the specified array.
|
||||
Substring expansion applied to an associative array produces undefined
|
||||
results.
|
||||
|
||||
Note that a negative offset must be separated from the colon by at least
|
||||
one space to avoid being confused with the @samp{:-} expansion.
|
||||
Substring indexing is zero-based unless the positional parameters
|
||||
@@ -1711,6 +1750,29 @@ is an array variable subscripted with @samp{@@} or @samp{*},
|
||||
the substitution operation is applied to each member of the
|
||||
array in turn, and the expansion is the resultant list.
|
||||
|
||||
@item $@{@var{parameter}^@var{pattern}@}
|
||||
@itemx $@{@var{parameter}^^@var{pattern}@}
|
||||
@itemx $@{@var{parameter},@var{pattern}@}
|
||||
@itemx $@{@var{parameter},,@var{pattern}@}
|
||||
This expansion modifies the case of alphabetic characters in @var{parameter}.
|
||||
The @var{pattern} is expanded to produce a pattern just as in
|
||||
pathname expansion.
|
||||
The @samp{^} operator converts lowercase letters matching @var{pattern}
|
||||
to uppercase; the @samp{,} operator converts matching uppercase letters
|
||||
to lowercase.
|
||||
The @samp{^^} and @samp{,,} expansions convert each matched character in the
|
||||
expanded value; the @samp{^} and @samp{,} expansions match and convert only
|
||||
the first character.
|
||||
If @var{pattern} is omitted, it is treated like a @samp{?}, which matches
|
||||
every character.
|
||||
If @var{parameter} is @samp{@@} or @samp{*},
|
||||
the case modification operation is applied to each positional
|
||||
parameter in turn, and the expansion is the resultant list.
|
||||
If @var{parameter}
|
||||
is an array variable subscripted with @samp{@@} or @samp{*},
|
||||
the case modification operation is applied to each member of the
|
||||
array in turn, and the expansion is the resultant list.
|
||||
|
||||
@end table
|
||||
|
||||
@node Command Substitution
|
||||
@@ -3321,7 +3383,7 @@ zero if @var{command} is found, and non-zero if not.
|
||||
@item declare
|
||||
@btindex declare
|
||||
@example
|
||||
declare [-aAfFirtx] [-p] [@var{name}[=@var{value}] @dots{}]
|
||||
declare [-aAfFilrtux] [-p] [@var{name}[=@var{value}] @dots{}]
|
||||
@end example
|
||||
|
||||
Declare variables and give them attributes. If no @var{name}s
|
||||
@@ -3363,6 +3425,11 @@ The variable is to be treated as
|
||||
an integer; arithmetic evaluation (@pxref{Shell Arithmetic}) is
|
||||
performed when the variable is assigned a value.
|
||||
|
||||
@item -l
|
||||
When the variable is assigned a value, all upper-case characters are
|
||||
converted to lower-case.
|
||||
The upper-case attribute is disabled.
|
||||
|
||||
@item -r
|
||||
Make @var{name}s readonly. These names cannot then be assigned values
|
||||
by subsequent assignment statements or unset.
|
||||
@@ -3373,6 +3440,11 @@ Traced functions inherit the @code{DEBUG} and @code{RETURN} traps from
|
||||
the calling shell.
|
||||
The trace attribute has no special meaning for variables.
|
||||
|
||||
@item -u
|
||||
When the variable is assigned a value, all lower-case characters are
|
||||
converted to upper-case.
|
||||
The lower-case attribute is disabled.
|
||||
|
||||
@item -x
|
||||
Mark each @var{name} for export to subsequent commands via
|
||||
the environment.
|
||||
@@ -3621,8 +3693,9 @@ meaning for the next character read and for line continuation.
|
||||
If no names are supplied, the line read is assigned to the
|
||||
variable @env{REPLY}.
|
||||
The return code is zero, unless end-of-file is encountered, @code{read}
|
||||
times out, or an invalid file descriptor is supplied as the argument to
|
||||
@option{-u}.
|
||||
times out (in which case the return code is greater than 128), or an
|
||||
invalid file descriptor is supplied as the argument to @option{-u}.
|
||||
|
||||
Options, if supplied, have the following meanings:
|
||||
|
||||
@table @code
|
||||
@@ -5828,8 +5901,8 @@ For almost every purpose, shell functions are preferred over aliases.
|
||||
@cindex arrays
|
||||
|
||||
Bash provides one-dimensional indexed and associative array variables.
|
||||
Any variable may be used as an array; the @code{declare} builtin will
|
||||
explicitly declare an array.
|
||||
Any variable may be used as an indexed array;
|
||||
the @code{declare} builtin will explicitly declare an array.
|
||||
There is no maximum
|
||||
limit on the size of an array, nor any requirement that members
|
||||
be indexed or assigned contiguously.
|
||||
@@ -5856,24 +5929,27 @@ The syntax
|
||||
declare -a @var{name}[@var{subscript}]
|
||||
@end example
|
||||
@noindent
|
||||
is also accepted; the @var{subscript} is ignored. Attributes may be
|
||||
specified for an array variable using the @code{declare} and
|
||||
@code{readonly} builtins. Each attribute applies to all members of
|
||||
an array.
|
||||
is also accepted; the @var{subscript} is ignored.
|
||||
|
||||
Associative arrays are created using
|
||||
@example
|
||||
declare -A @var{name}.
|
||||
@end example
|
||||
|
||||
Attributes may be
|
||||
specified for an array variable using the @code{declare} and
|
||||
@code{readonly} builtins. Each attribute applies to all members of
|
||||
an array.
|
||||
|
||||
Arrays are assigned to using compound assignments of the form
|
||||
@example
|
||||
name=(value@var{1} @dots{} value@var{n})
|
||||
@end example
|
||||
@noindent
|
||||
where each
|
||||
@var{value} is of the form @code{[[@var{subscript}]=]}@var{string}.
|
||||
When using indexed arrays, if
|
||||
@var{value} is of the form @code{[@var{subscript}]=}@var{string}.
|
||||
Indexed array assignments do not require the bracket and subscript.
|
||||
When assigning to indexed arrays, if
|
||||
the optional subscript is supplied, that index is assigned to;
|
||||
otherwise the index of the element assigned is the last index assigned
|
||||
to by the statement plus one. Indexing starts at zero.
|
||||
@@ -6655,8 +6731,9 @@ argument restricts operation to running jobs.
|
||||
suspend [-f]
|
||||
@end example
|
||||
Suspend the execution of this shell until it receives a
|
||||
@code{SIGCONT} signal. The @option{-f} option means to suspend
|
||||
even if the shell is a login shell.
|
||||
@code{SIGCONT} signal.
|
||||
A login shell cannot be suspended; the @option{-f}
|
||||
option can be used to override this and force the suspension.
|
||||
|
||||
@end table
|
||||
|
||||
@@ -7076,6 +7153,10 @@ Include support for matching POSIX regular expressions using the
|
||||
@samp{=~} binary operator in the @code{[[} conditional command.
|
||||
(@pxref{Conditional Constructs}).
|
||||
|
||||
@item --enable-coprocesses
|
||||
Include support for coprocesses and the @code{coproc} reserved word
|
||||
(@pxref{Pipelines}).
|
||||
|
||||
@item --enable-debugger
|
||||
Include support for the bash debugger (distributed separately).
|
||||
|
||||
|
||||
+98
-17
@@ -16,7 +16,7 @@ This is Edition @value{EDITION}, last updated @value{UPDATED},
|
||||
of @cite{The GNU Bash Reference Manual},
|
||||
for @code{Bash}, Version @value{VERSION}.
|
||||
|
||||
Copyright @copyright{} 1988--2007 Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1988--2008 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
@@ -584,6 +584,7 @@ some other grouping.
|
||||
commands.
|
||||
* Lists:: How to execute commands sequentially.
|
||||
* Compound Commands:: Shell commands for control flow.
|
||||
* Coprocesses:: Two-way communication between commands.
|
||||
@end menu
|
||||
|
||||
@node Simple Commands
|
||||
@@ -1074,6 +1075,41 @@ from the @var{list} by whitespace.
|
||||
The exit status of both of these constructs is the exit status of
|
||||
@var{list}.
|
||||
|
||||
@node Coprocesses
|
||||
@subsection Coprocesses
|
||||
@cindex coprocess
|
||||
|
||||
A @code{coprocess} is a shell command preceded by the @code{coproc}
|
||||
reserved word.
|
||||
A coprocess is executed asynchronously in a subshell, as if the command
|
||||
had been terminated with the @samp{&} control operator, with a two-way pipe
|
||||
established between the executing shell and the coprocess.
|
||||
|
||||
The format for a coprocess is:
|
||||
@example
|
||||
@code{coproc} [@var{NAME}] @var{command} [@var{redirections}]
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
This creates a coprocess named @var{NAME}.
|
||||
If @var{NAME} is not supplied, the default name is @var{COPROC}.
|
||||
|
||||
When the coproc is executed, the shell creates an array variable
|
||||
(@pxref{Arrays})
|
||||
named @var{NAME} in the context of the executing shell.
|
||||
The standard output of @var{command}
|
||||
is connected via a pipe to a file descriptor in the executing shell,
|
||||
and that file descriptor is assigned to @var{NAME}[0].
|
||||
The standard input of @var{command}
|
||||
is connected via a pipe to a file descriptor in the executing shell,
|
||||
and that file descriptor is assigned to @var{NAME}[1].
|
||||
This pipe is established before any redirections specified by the
|
||||
command (@pxref{Redirections}).
|
||||
The file descriptors can be utilized as arguments to shell commands
|
||||
and redirections using standard word expansions.
|
||||
|
||||
The return status of a coprocess is the exit status of @var{command}.
|
||||
|
||||
@node Shell Functions
|
||||
@section Shell Functions
|
||||
@cindex shell function
|
||||
@@ -1620,11 +1656,14 @@ If @var{offset} evaluates to a number less than zero, the value
|
||||
is used as an offset from the end of the value of @var{parameter}.
|
||||
If @var{parameter} is @samp{@@}, the result is @var{length} positional
|
||||
parameters beginning at @var{offset}.
|
||||
If @var{parameter} is an array name indexed by @samp{@@} or @samp{*},
|
||||
the result is the @var{length}
|
||||
If @var{parameter} is an indexed array name subscripted
|
||||
by @samp{@@} or @samp{*}, the result is the @var{length}
|
||||
members of the array beginning with @code{$@{@var{parameter}[@var{offset}]@}}.
|
||||
A negative @var{offset} is taken relative to one greater than the maximum
|
||||
index of the specified array.
|
||||
Substring expansion applied to an associative array produces undefined
|
||||
results.
|
||||
|
||||
Note that a negative offset must be separated from the colon by at least
|
||||
one space to avoid being confused with the @samp{:-} expansion.
|
||||
Substring indexing is zero-based unless the positional parameters
|
||||
@@ -1711,6 +1750,29 @@ is an array variable subscripted with @samp{@@} or @samp{*},
|
||||
the substitution operation is applied to each member of the
|
||||
array in turn, and the expansion is the resultant list.
|
||||
|
||||
@item $@{@var{parameter}^@var{pattern}@}
|
||||
@itemx $@{@var{parameter}^^@var{pattern}@}
|
||||
@itemx $@{@var{parameter},@var{pattern}@}
|
||||
@itemx $@{@var{parameter},,@var{pattern}@}
|
||||
This expansion modifies the case of alphabetic characters in @var{parameter}.
|
||||
The @var{pattern} is expanded to produce a pattern just as in
|
||||
pathname expansion.
|
||||
The @samp{^} operator converts lowercase letters matching @var{pattern}
|
||||
to uppercase; the @samp{,} operator converts matching uppercase letters
|
||||
to lowercase.
|
||||
The @samp{^^} and @samp{,,} expansions convert each matched character in the
|
||||
expanded value; the @samp{^} and @samp{,} expansions match and convert only
|
||||
the first character.
|
||||
If @var{pattern} is omitted, it is treated like a @samp{?}, which matches
|
||||
every character.
|
||||
If @var{parameter} is @samp{@@} or @samp{*},
|
||||
the case modification operation is applied to each positional
|
||||
parameter in turn, and the expansion is the resultant list.
|
||||
If @var{parameter}
|
||||
is an array variable subscripted with @samp{@@} or @samp{*},
|
||||
the case modification operation is applied to each member of the
|
||||
array in turn, and the expansion is the resultant list.
|
||||
|
||||
@end table
|
||||
|
||||
@node Command Substitution
|
||||
@@ -3321,7 +3383,7 @@ zero if @var{command} is found, and non-zero if not.
|
||||
@item declare
|
||||
@btindex declare
|
||||
@example
|
||||
declare [-aAfFirtx] [-p] [@var{name}[=@var{value}] @dots{}]
|
||||
declare [-aAfFilrtux] [-p] [@var{name}[=@var{value}] @dots{}]
|
||||
@end example
|
||||
|
||||
Declare variables and give them attributes. If no @var{name}s
|
||||
@@ -3363,6 +3425,11 @@ The variable is to be treated as
|
||||
an integer; arithmetic evaluation (@pxref{Shell Arithmetic}) is
|
||||
performed when the variable is assigned a value.
|
||||
|
||||
@item -l
|
||||
When the variable is assigned a value, all upper-case characters are
|
||||
converted to lower-case.
|
||||
The upper-case attribute is disabled.
|
||||
|
||||
@item -r
|
||||
Make @var{name}s readonly. These names cannot then be assigned values
|
||||
by subsequent assignment statements or unset.
|
||||
@@ -3373,6 +3440,11 @@ Traced functions inherit the @code{DEBUG} and @code{RETURN} traps from
|
||||
the calling shell.
|
||||
The trace attribute has no special meaning for variables.
|
||||
|
||||
@item -u
|
||||
When the variable is assigned a value, all lower-case characters are
|
||||
converted to upper-case.
|
||||
The lower-case attribute is disabled.
|
||||
|
||||
@item -x
|
||||
Mark each @var{name} for export to subsequent commands via
|
||||
the environment.
|
||||
@@ -3621,8 +3693,9 @@ meaning for the next character read and for line continuation.
|
||||
If no names are supplied, the line read is assigned to the
|
||||
variable @env{REPLY}.
|
||||
The return code is zero, unless end-of-file is encountered, @code{read}
|
||||
times out, or an invalid file descriptor is supplied as the argument to
|
||||
@option{-u}.
|
||||
times out (in which case the return code is greater than 128), or an
|
||||
invalid file descriptor is supplied as the argument to @option{-u}.
|
||||
|
||||
Options, if supplied, have the following meanings:
|
||||
|
||||
@table @code
|
||||
@@ -4558,7 +4631,7 @@ builtin).
|
||||
An associative array variable whose members correspond to the internal
|
||||
hash table of commands as maintained by the @code{hash} builtin
|
||||
(@pxref{Bourne Shell Builtins}).
|
||||
Elements are to this array appear in the hash table; unsetting array
|
||||
Elements added to this array appear in the hash table; unsetting array
|
||||
elements cause commands to be removed from the hash table.
|
||||
|
||||
@item BASH_COMMAND
|
||||
@@ -5828,8 +5901,8 @@ For almost every purpose, shell functions are preferred over aliases.
|
||||
@cindex arrays
|
||||
|
||||
Bash provides one-dimensional indexed and associative array variables.
|
||||
Any variable may be used as an array; the @code{declare} builtin will
|
||||
explicitly declare an array.
|
||||
Any variable may be used as an indexed array;
|
||||
the @code{declare} builtin will explicitly declare an array.
|
||||
There is no maximum
|
||||
limit on the size of an array, nor any requirement that members
|
||||
be indexed or assigned contiguously.
|
||||
@@ -5856,24 +5929,27 @@ The syntax
|
||||
declare -a @var{name}[@var{subscript}]
|
||||
@end example
|
||||
@noindent
|
||||
is also accepted; the @var{subscript} is ignored. Attributes may be
|
||||
specified for an array variable using the @code{declare} and
|
||||
@code{readonly} builtins. Each attribute applies to all members of
|
||||
an array.
|
||||
is also accepted; the @var{subscript} is ignored.
|
||||
|
||||
Associative arrays are created using
|
||||
@example
|
||||
declare -A @var{name}.
|
||||
@end example
|
||||
|
||||
Attributes may be
|
||||
specified for an array variable using the @code{declare} and
|
||||
@code{readonly} builtins. Each attribute applies to all members of
|
||||
an array.
|
||||
|
||||
Arrays are assigned to using compound assignments of the form
|
||||
@example
|
||||
name=(value@var{1} @dots{} value@var{n})
|
||||
@end example
|
||||
@noindent
|
||||
where each
|
||||
@var{value} is of the form @code{[[@var{subscript}]=]}@var{string}.
|
||||
When using indexed arrays, if
|
||||
@var{value} is of the form @code{[@var{subscript}]=}@var{string}.
|
||||
Indexed array assignments do not require the bracket and subscript.
|
||||
When assigning to indexed arrays, if
|
||||
the optional subscript is supplied, that index is assigned to;
|
||||
otherwise the index of the element assigned is the last index assigned
|
||||
to by the statement plus one. Indexing starts at zero.
|
||||
@@ -6655,8 +6731,9 @@ argument restricts operation to running jobs.
|
||||
suspend [-f]
|
||||
@end example
|
||||
Suspend the execution of this shell until it receives a
|
||||
@code{SIGCONT} signal. The @option{-f} option means to suspend
|
||||
even if the shell is a login shell.
|
||||
@code{SIGCONT} signal.
|
||||
A login shell cannot be suspended; the @option{-f}
|
||||
option can be used to override this and force the suspension.
|
||||
|
||||
@end table
|
||||
|
||||
@@ -7076,6 +7153,10 @@ Include support for matching POSIX regular expressions using the
|
||||
@samp{=~} binary operator in the @code{[[} conditional command.
|
||||
(@pxref{Conditional Constructs}).
|
||||
|
||||
@item --enable-coprocesses
|
||||
Include support for coprocesses and the @code{coproc} reserved word
|
||||
(@pxref{Pipelines}).
|
||||
|
||||
@item --enable-debugger
|
||||
Include support for the bash debugger (distributed separately).
|
||||
|
||||
|
||||
+10
-10
@@ -30,21 +30,21 @@
|
||||
\subsecentry{Shell Parameter Expansion}{3}{5}{3}{19}
|
||||
\subsecentry{Command Substitution}{3}{5}{4}{22}
|
||||
\subsecentry{Arithmetic Expansion}{3}{5}{5}{22}
|
||||
\subsecentry{Process Substitution}{3}{5}{6}{22}
|
||||
\subsecentry{Process Substitution}{3}{5}{6}{23}
|
||||
\subsecentry{Word Splitting}{3}{5}{7}{23}
|
||||
\subsecentry{Filename Expansion}{3}{5}{8}{23}
|
||||
\subsecentry{Filename Expansion}{3}{5}{8}{24}
|
||||
\subsubsecentry{Pattern Matching}{3}{5}{8}{1}{24}
|
||||
\subsecentry{Quote Removal}{3}{5}{9}{25}
|
||||
\secentry{Redirections}{3}{6}{25}
|
||||
\subsecentry{Redirecting Input}{3}{6}{1}{26}
|
||||
\subsecentry{Redirecting Output}{3}{6}{2}{26}
|
||||
\subsecentry{Redirecting Output}{3}{6}{2}{27}
|
||||
\subsecentry{Appending Redirected Output}{3}{6}{3}{27}
|
||||
\subsecentry{Redirecting Standard Output and Standard Error}{3}{6}{4}{27}
|
||||
\subsecentry{Appending Standard Output and Standard Error}{3}{6}{5}{27}
|
||||
\subsecentry{Here Documents}{3}{6}{6}{27}
|
||||
\subsecentry{Here Documents}{3}{6}{6}{28}
|
||||
\subsecentry{Here Strings}{3}{6}{7}{28}
|
||||
\subsecentry{Duplicating File Descriptors}{3}{6}{8}{28}
|
||||
\subsecentry{Moving File Descriptors}{3}{6}{9}{28}
|
||||
\subsecentry{Moving File Descriptors}{3}{6}{9}{29}
|
||||
\subsecentry{Opening File Descriptors for Reading and Writing}{3}{6}{10}{29}
|
||||
\secentry{Executing Commands}{3}{7}{29}
|
||||
\subsecentry{Simple Command Expansion}{3}{7}{1}{29}
|
||||
@@ -59,7 +59,7 @@
|
||||
\secentry{Bash Builtin Commands}{4}{2}{41}
|
||||
\secentry{Modifying Shell Behavior}{4}{3}{50}
|
||||
\subsecentry{The Set Builtin}{4}{3}{1}{50}
|
||||
\subsecentry{The Shopt Builtin}{4}{3}{2}{53}
|
||||
\subsecentry{The Shopt Builtin}{4}{3}{2}{54}
|
||||
\secentry{Special Builtins}{4}{4}{58}
|
||||
\chapentry{Shell Variables}{5}{59}
|
||||
\secentry{Bourne Shell Variables}{5}{1}{59}
|
||||
@@ -76,14 +76,14 @@
|
||||
\secentry{Aliases}{6}{6}{77}
|
||||
\secentry{Arrays}{6}{7}{78}
|
||||
\secentry{The Directory Stack}{6}{8}{79}
|
||||
\subsecentry{Directory Stack Builtins}{6}{8}{1}{79}
|
||||
\secentry{Controlling the Prompt}{6}{9}{80}
|
||||
\subsecentry{Directory Stack Builtins}{6}{8}{1}{80}
|
||||
\secentry{Controlling the Prompt}{6}{9}{81}
|
||||
\secentry{The Restricted Shell}{6}{10}{82}
|
||||
\secentry{Bash POSIX Mode}{6}{11}{82}
|
||||
\secentry{Bash POSIX Mode}{6}{11}{83}
|
||||
\chapentry{Job Control}{7}{87}
|
||||
\secentry{Job Control Basics}{7}{1}{87}
|
||||
\secentry{Job Control Builtins}{7}{2}{88}
|
||||
\secentry{Job Control Variables}{7}{3}{89}
|
||||
\secentry{Job Control Variables}{7}{3}{90}
|
||||
\chapentry{Command Line Editing}{8}{91}
|
||||
\secentry{Introduction to Line Editing}{8}{1}{91}
|
||||
\secentry{Readline Interaction}{8}{2}{91}
|
||||
|
||||
+20
-17
@@ -22,49 +22,51 @@
|
||||
\entry{PS2}{59}{\code {PS2}}
|
||||
\entry{BASH}{59}{\code {BASH}}
|
||||
\entry{BASHPID}{60}{\code {BASHPID}}
|
||||
\entry{BASH_ALIASES}{60}{\code {BASH_ALIASES}}
|
||||
\entry{BASH_ARGC}{60}{\code {BASH_ARGC}}
|
||||
\entry{BASH_ARGV}{60}{\code {BASH_ARGV}}
|
||||
\entry{BASH_CMDS}{60}{\code {BASH_CMDS}}
|
||||
\entry{BASH_COMMAND}{60}{\code {BASH_COMMAND}}
|
||||
\entry{BASH_ENV}{60}{\code {BASH_ENV}}
|
||||
\entry{BASH_EXECUTION_STRING}{60}{\code {BASH_EXECUTION_STRING}}
|
||||
\entry{BASH_LINENO}{60}{\code {BASH_LINENO}}
|
||||
\entry{BASH_REMATCH}{60}{\code {BASH_REMATCH}}
|
||||
\entry{BASH_SOURCE}{60}{\code {BASH_SOURCE}}
|
||||
\entry{BASH_REMATCH}{61}{\code {BASH_REMATCH}}
|
||||
\entry{BASH_SOURCE}{61}{\code {BASH_SOURCE}}
|
||||
\entry{BASH_SUBSHELL}{61}{\code {BASH_SUBSHELL}}
|
||||
\entry{BASH_VERSINFO}{61}{\code {BASH_VERSINFO}}
|
||||
\entry{BASH_VERSION}{61}{\code {BASH_VERSION}}
|
||||
\entry{COLUMNS}{61}{\code {COLUMNS}}
|
||||
\entry{COMP_CWORD}{61}{\code {COMP_CWORD}}
|
||||
\entry{COMP_LINE}{61}{\code {COMP_LINE}}
|
||||
\entry{COMP_POINT}{61}{\code {COMP_POINT}}
|
||||
\entry{COMP_TYPE}{61}{\code {COMP_TYPE}}
|
||||
\entry{COMP_POINT}{62}{\code {COMP_POINT}}
|
||||
\entry{COMP_TYPE}{62}{\code {COMP_TYPE}}
|
||||
\entry{COMP_KEY}{62}{\code {COMP_KEY}}
|
||||
\entry{COMP_WORDBREAKS}{62}{\code {COMP_WORDBREAKS}}
|
||||
\entry{COMP_WORDS}{62}{\code {COMP_WORDS}}
|
||||
\entry{COMPREPLY}{62}{\code {COMPREPLY}}
|
||||
\entry{DIRSTACK}{62}{\code {DIRSTACK}}
|
||||
\entry{EMACS}{62}{\code {EMACS}}
|
||||
\entry{EUID}{62}{\code {EUID}}
|
||||
\entry{FCEDIT}{62}{\code {FCEDIT}}
|
||||
\entry{FIGNORE}{62}{\code {FIGNORE}}
|
||||
\entry{FUNCNAME}{62}{\code {FUNCNAME}}
|
||||
\entry{EUID}{63}{\code {EUID}}
|
||||
\entry{FCEDIT}{63}{\code {FCEDIT}}
|
||||
\entry{FIGNORE}{63}{\code {FIGNORE}}
|
||||
\entry{FUNCNAME}{63}{\code {FUNCNAME}}
|
||||
\entry{GLOBIGNORE}{63}{\code {GLOBIGNORE}}
|
||||
\entry{GROUPS}{63}{\code {GROUPS}}
|
||||
\entry{histchars}{63}{\code {histchars}}
|
||||
\entry{HISTCMD}{63}{\code {HISTCMD}}
|
||||
\entry{HISTCONTROL}{63}{\code {HISTCONTROL}}
|
||||
\entry{HISTFILE}{63}{\code {HISTFILE}}
|
||||
\entry{HISTFILESIZE}{63}{\code {HISTFILESIZE}}
|
||||
\entry{HISTIGNORE}{63}{\code {HISTIGNORE}}
|
||||
\entry{HISTFILE}{64}{\code {HISTFILE}}
|
||||
\entry{HISTFILESIZE}{64}{\code {HISTFILESIZE}}
|
||||
\entry{HISTIGNORE}{64}{\code {HISTIGNORE}}
|
||||
\entry{HISTSIZE}{64}{\code {HISTSIZE}}
|
||||
\entry{HISTTIMEFORMAT}{64}{\code {HISTTIMEFORMAT}}
|
||||
\entry{HOSTFILE}{64}{\code {HOSTFILE}}
|
||||
\entry{HOSTNAME}{64}{\code {HOSTNAME}}
|
||||
\entry{HOSTTYPE}{64}{\code {HOSTTYPE}}
|
||||
\entry{IGNOREEOF}{64}{\code {IGNOREEOF}}
|
||||
\entry{INPUTRC}{64}{\code {INPUTRC}}
|
||||
\entry{LANG}{64}{\code {LANG}}
|
||||
\entry{LC_ALL}{64}{\code {LC_ALL}}
|
||||
\entry{INPUTRC}{65}{\code {INPUTRC}}
|
||||
\entry{LANG}{65}{\code {LANG}}
|
||||
\entry{LC_ALL}{65}{\code {LC_ALL}}
|
||||
\entry{LC_COLLATE}{65}{\code {LC_COLLATE}}
|
||||
\entry{LC_CTYPE}{65}{\code {LC_CTYPE}}
|
||||
\entry{LC_MESSAGES}{65}{\code {LC_MESSAGES}}
|
||||
@@ -77,9 +79,10 @@
|
||||
\entry{OPTERR}{65}{\code {OPTERR}}
|
||||
\entry{OSTYPE}{65}{\code {OSTYPE}}
|
||||
\entry{PIPESTATUS}{65}{\code {PIPESTATUS}}
|
||||
\entry{POSIXLY_CORRECT}{65}{\code {POSIXLY_CORRECT}}
|
||||
\entry{POSIXLY_CORRECT}{66}{\code {POSIXLY_CORRECT}}
|
||||
\entry{PPID}{66}{\code {PPID}}
|
||||
\entry{PROMPT_COMMAND}{66}{\code {PROMPT_COMMAND}}
|
||||
\entry{PROMPT_DIRTRIM}{66}{\code {PROMPT_DIRTRIM}}
|
||||
\entry{PS3}{66}{\code {PS3}}
|
||||
\entry{PS4}{66}{\code {PS4}}
|
||||
\entry{PWD}{66}{\code {PWD}}
|
||||
@@ -88,8 +91,8 @@
|
||||
\entry{SECONDS}{66}{\code {SECONDS}}
|
||||
\entry{SHELL}{66}{\code {SHELL}}
|
||||
\entry{SHELLOPTS}{66}{\code {SHELLOPTS}}
|
||||
\entry{SHLVL}{66}{\code {SHLVL}}
|
||||
\entry{TIMEFORMAT}{66}{\code {TIMEFORMAT}}
|
||||
\entry{SHLVL}{67}{\code {SHLVL}}
|
||||
\entry{TIMEFORMAT}{67}{\code {TIMEFORMAT}}
|
||||
\entry{TMOUT}{67}{\code {TMOUT}}
|
||||
\entry{TMPDIR}{67}{\code {TMPDIR}}
|
||||
\entry{UID}{67}{\code {UID}}
|
||||
|
||||
+20
-17
@@ -20,14 +20,16 @@
|
||||
\entry {\code {auto_resume}}{90}
|
||||
\initial {B}
|
||||
\entry {\code {BASH}}{59}
|
||||
\entry {\code {BASH_ALIASES}}{60}
|
||||
\entry {\code {BASH_ARGC}}{60}
|
||||
\entry {\code {BASH_ARGV}}{60}
|
||||
\entry {\code {BASH_CMDS}}{60}
|
||||
\entry {\code {BASH_COMMAND}}{60}
|
||||
\entry {\code {BASH_ENV}}{60}
|
||||
\entry {\code {BASH_EXECUTION_STRING}}{60}
|
||||
\entry {\code {BASH_LINENO}}{60}
|
||||
\entry {\code {BASH_REMATCH}}{60}
|
||||
\entry {\code {BASH_SOURCE}}{60}
|
||||
\entry {\code {BASH_REMATCH}}{61}
|
||||
\entry {\code {BASH_SOURCE}}{61}
|
||||
\entry {\code {BASH_SUBSHELL}}{61}
|
||||
\entry {\code {BASH_VERSINFO}}{61}
|
||||
\entry {\code {BASH_VERSION}}{61}
|
||||
@@ -41,8 +43,8 @@
|
||||
\entry {\code {COMP_CWORD}}{61}
|
||||
\entry {\code {COMP_KEY}}{62}
|
||||
\entry {\code {COMP_LINE}}{61}
|
||||
\entry {\code {COMP_POINT}}{61}
|
||||
\entry {\code {COMP_TYPE}}{61}
|
||||
\entry {\code {COMP_POINT}}{62}
|
||||
\entry {\code {COMP_TYPE}}{62}
|
||||
\entry {\code {COMP_WORDBREAKS}}{62}
|
||||
\entry {\code {COMP_WORDS}}{62}
|
||||
\entry {\code {completion-prefix-display-length}}{95}
|
||||
@@ -56,12 +58,12 @@
|
||||
\entry {\code {editing-mode}}{96}
|
||||
\entry {\code {EMACS}}{62}
|
||||
\entry {\code {enable-keypad}}{96}
|
||||
\entry {\code {EUID}}{62}
|
||||
\entry {\code {EUID}}{63}
|
||||
\entry {\code {expand-tilde}}{96}
|
||||
\initial {F}
|
||||
\entry {\code {FCEDIT}}{62}
|
||||
\entry {\code {FIGNORE}}{62}
|
||||
\entry {\code {FUNCNAME}}{62}
|
||||
\entry {\code {FCEDIT}}{63}
|
||||
\entry {\code {FIGNORE}}{63}
|
||||
\entry {\code {FUNCNAME}}{63}
|
||||
\initial {G}
|
||||
\entry {\code {GLOBIGNORE}}{63}
|
||||
\entry {\code {GROUPS}}{63}
|
||||
@@ -69,9 +71,9 @@
|
||||
\entry {\code {histchars}}{63}
|
||||
\entry {\code {HISTCMD}}{63}
|
||||
\entry {\code {HISTCONTROL}}{63}
|
||||
\entry {\code {HISTFILE}}{63}
|
||||
\entry {\code {HISTFILESIZE}}{63}
|
||||
\entry {\code {HISTIGNORE}}{63}
|
||||
\entry {\code {HISTFILE}}{64}
|
||||
\entry {\code {HISTFILESIZE}}{64}
|
||||
\entry {\code {HISTIGNORE}}{64}
|
||||
\entry {\code {history-preserve-point}}{96}
|
||||
\entry {\code {history-size}}{96}
|
||||
\entry {\code {HISTSIZE}}{64}
|
||||
@@ -85,13 +87,13 @@
|
||||
\entry {\code {IFS}}{59}
|
||||
\entry {\code {IGNOREEOF}}{64}
|
||||
\entry {\code {input-meta}}{96}
|
||||
\entry {\code {INPUTRC}}{64}
|
||||
\entry {\code {INPUTRC}}{65}
|
||||
\entry {\code {isearch-terminators}}{97}
|
||||
\initial {K}
|
||||
\entry {\code {keymap}}{97}
|
||||
\initial {L}
|
||||
\entry {\code {LANG}}{64}
|
||||
\entry {\code {LC_ALL}}{64}
|
||||
\entry {\code {LANG}}{65}
|
||||
\entry {\code {LC_ALL}}{65}
|
||||
\entry {\code {LC_COLLATE}}{65}
|
||||
\entry {\code {LC_CTYPE}}{65}
|
||||
\entry {\code {LC_MESSAGES}}{7, 65}
|
||||
@@ -118,9 +120,10 @@
|
||||
\entry {\code {page-completions}}{97}
|
||||
\entry {\code {PATH}}{59}
|
||||
\entry {\code {PIPESTATUS}}{65}
|
||||
\entry {\code {POSIXLY_CORRECT}}{65}
|
||||
\entry {\code {POSIXLY_CORRECT}}{66}
|
||||
\entry {\code {PPID}}{66}
|
||||
\entry {\code {PROMPT_COMMAND}}{66}
|
||||
\entry {\code {PROMPT_DIRTRIM}}{66}
|
||||
\entry {\code {PS1}}{59}
|
||||
\entry {\code {PS2}}{59}
|
||||
\entry {\code {PS3}}{66}
|
||||
@@ -134,13 +137,13 @@
|
||||
\entry {\code {SECONDS}}{66}
|
||||
\entry {\code {SHELL}}{66}
|
||||
\entry {\code {SHELLOPTS}}{66}
|
||||
\entry {\code {SHLVL}}{66}
|
||||
\entry {\code {SHLVL}}{67}
|
||||
\entry {\code {show-all-if-ambiguous}}{98}
|
||||
\entry {\code {show-all-if-unmodified}}{98}
|
||||
\initial {T}
|
||||
\entry {\code {TEXTDOMAIN}}{7}
|
||||
\entry {\code {TEXTDOMAINDIR}}{7}
|
||||
\entry {\code {TIMEFORMAT}}{66}
|
||||
\entry {\code {TIMEFORMAT}}{67}
|
||||
\entry {\code {TMOUT}}{67}
|
||||
\entry {\code {TMPDIR}}{67}
|
||||
\initial {U}
|
||||
|
||||
+101
-94
@@ -330,8 +330,8 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
loop) is resumed. The return value is 0 unless _n is not greater
|
||||
than or equal to 1.
|
||||
|
||||
ddeeccllaarree [--aaffFFiirrttxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
|
||||
ttyyppeesseett [--aaffFFiirrttxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
|
||||
ddeeccllaarree [--aaAAffFFiirrttxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
|
||||
ttyyppeesseett [--aaAAffFFiirrttxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
|
||||
Declare variables and/or give them attributes. If no _n_a_m_es are
|
||||
given then display the values of variables. The --pp option will
|
||||
display the attributes and values of each _n_a_m_e. When --pp is used
|
||||
@@ -348,7 +348,10 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
played as well. The --FF option implies --ff. The following
|
||||
options can be used to restrict output to variables with the
|
||||
specified attribute or to give variables attributes:
|
||||
--aa Each _n_a_m_e is an array variable (see AArrrraayyss above).
|
||||
--aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss
|
||||
above).
|
||||
--AA Each _n_a_m_e is an associative array variable (see AArrrraayyss
|
||||
above).
|
||||
--ff Use function names only.
|
||||
--ii The variable is treated as an integer; arithmetic evalua-
|
||||
tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN )) is performed when the
|
||||
@@ -722,126 +725,126 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
|
||||
llooggoouutt Exit a login shell.
|
||||
|
||||
mmaappffiillee [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u
|
||||
nt_] _[--tt_] _[--uu _f_d_] _[--CC _c_a_l_l_b_a_c_k_] _[--cc _I_q_u_a_n_t_u_m]] [[_a_r_r_a_y]] RReeaadd lliinneess
|
||||
ffrroomm tthhee ssttaannddaarrdd iinnppuutt iinnttoo aarrrraayy vvaarriiaabbllee _a_r_r_a_y, or from file
|
||||
descriptor _f_d if the --uu option is supplied. The variable MMAAPP--
|
||||
FFIILLEE is the default _a_r_r_a_y. Options, if supplied, have the fol-
|
||||
lowing meanings:
|
||||
--nn Copy at most _c_o_u_n_t lines. If _c_o_u_n_t is 0, all lines are
|
||||
mmaappffiillee [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC _c_a_l_l_b_a_c_k]
|
||||
[--cc _q_u_a_n_t_u_m] [_a_r_r_a_y]
|
||||
Read lines from the standard input into array variable _a_r_r_a_y, or
|
||||
from file descriptor _f_d if the --uu option is supplied. The vari-
|
||||
able MMAAPPFFIILLEE is the default _a_r_r_a_y. Options, if supplied, have
|
||||
the following meanings:
|
||||
--nn Copy at most _c_o_u_n_t lines. If _c_o_u_n_t is 0, all lines are
|
||||
copied.
|
||||
--OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default
|
||||
--OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default
|
||||
index is 0.
|
||||
--ss Discard the first _c_o_u_n_t lines read.
|
||||
--tt Remove a trailing line from each line read.
|
||||
--uu Read lines from file descriptor _f_d instead of the stan-
|
||||
--uu Read lines from file descriptor _f_d instead of the stan-
|
||||
dard input.
|
||||
--CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The
|
||||
--CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The
|
||||
--cc option specifies _q_u_a_n_t_u_m.
|
||||
--cc Specify the number of lines read between each call to
|
||||
--cc Specify the number of lines read between each call to
|
||||
_c_a_l_l_b_a_c_k.
|
||||
|
||||
If --CC is specified without --cc, the default quantum is 5000.
|
||||
|
||||
If not supplied with an explicit origin, mmaappffiillee will clear
|
||||
If not supplied with an explicit origin, mmaappffiillee will clear
|
||||
_a_r_r_a_y before assigning to it.
|
||||
|
||||
mmaappffiillee returns successfully unless an invalid option or option
|
||||
mmaappffiillee returns successfully unless an invalid option or option
|
||||
argument is supplied, or _a_r_r_a_y is invalid or unassignable.
|
||||
|
||||
ppooppdd [-nn] [+_n] [-_n]
|
||||
Removes entries from the directory stack. With no arguments,
|
||||
removes the top directory from the stack, and performs a ccdd to
|
||||
Removes entries from the directory stack. With no arguments,
|
||||
removes the top directory from the stack, and performs a ccdd to
|
||||
the new top directory. Arguments, if supplied, have the follow-
|
||||
ing meanings:
|
||||
--nn Suppresses the normal change of directory when removing
|
||||
directories from the stack, so that only the stack is
|
||||
--nn Suppresses the normal change of directory when removing
|
||||
directories from the stack, so that only the stack is
|
||||
manipulated.
|
||||
++_n Removes the _nth entry counting from the left of the list
|
||||
shown by ddiirrss, starting with zero. For example: ``popd
|
||||
++_n Removes the _nth entry counting from the left of the list
|
||||
shown by ddiirrss, starting with zero. For example: ``popd
|
||||
+0'' removes the first directory, ``popd +1'' the second.
|
||||
--_n Removes the _nth entry counting from the right of the list
|
||||
shown by ddiirrss, starting with zero. For example: ``popd
|
||||
-0'' removes the last directory, ``popd -1'' the next to
|
||||
shown by ddiirrss, starting with zero. For example: ``popd
|
||||
-0'' removes the last directory, ``popd -1'' the next to
|
||||
last.
|
||||
|
||||
If the ppooppdd command is successful, a ddiirrss is performed as well,
|
||||
and the return status is 0. ppooppdd returns false if an invalid
|
||||
If the ppooppdd command is successful, a ddiirrss is performed as well,
|
||||
and the return status is 0. ppooppdd returns false if an invalid
|
||||
option is encountered, the directory stack is empty, a non-exis-
|
||||
tent directory stack entry is specified, or the directory change
|
||||
fails.
|
||||
|
||||
pprriinnttff [--vv _v_a_r] _f_o_r_m_a_t [_a_r_g_u_m_e_n_t_s]
|
||||
Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the
|
||||
control of the _f_o_r_m_a_t. The _f_o_r_m_a_t is a character string which
|
||||
contains three types of objects: plain characters, which are
|
||||
simply copied to standard output, character escape sequences,
|
||||
which are converted and copied to the standard output, and for-
|
||||
mat specifications, each of which causes printing of the next
|
||||
Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the
|
||||
control of the _f_o_r_m_a_t. The _f_o_r_m_a_t is a character string which
|
||||
contains three types of objects: plain characters, which are
|
||||
simply copied to standard output, character escape sequences,
|
||||
which are converted and copied to the standard output, and for-
|
||||
mat specifications, each of which causes printing of the next
|
||||
successive _a_r_g_u_m_e_n_t. In addition to the standard _p_r_i_n_t_f(1) for-
|
||||
mats, %%bb causes pprriinnttff to expand backslash escape sequences in
|
||||
the corresponding _a_r_g_u_m_e_n_t (except that \\cc terminates output,
|
||||
mats, %%bb causes pprriinnttff to expand backslash escape sequences in
|
||||
the corresponding _a_r_g_u_m_e_n_t (except that \\cc terminates output,
|
||||
backslashes in \\'', \\"", and \\?? are not removed, and octal escapes
|
||||
beginning with \\00 may contain up to four digits), and %%qq causes
|
||||
beginning with \\00 may contain up to four digits), and %%qq causes
|
||||
pprriinnttff to output the corresponding _a_r_g_u_m_e_n_t in a format that can
|
||||
be reused as shell input.
|
||||
|
||||
The --vv option causes the output to be assigned to the variable
|
||||
The --vv option causes the output to be assigned to the variable
|
||||
_v_a_r rather than being printed to the standard output.
|
||||
|
||||
The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_-
|
||||
The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_-
|
||||
_m_e_n_t_s. If the _f_o_r_m_a_t requires more _a_r_g_u_m_e_n_t_s than are supplied,
|
||||
the extra format specifications behave as if a zero value or
|
||||
null string, as appropriate, had been supplied. The return
|
||||
the extra format specifications behave as if a zero value or
|
||||
null string, as appropriate, had been supplied. The return
|
||||
value is zero on success, non-zero on failure.
|
||||
|
||||
ppuusshhdd [--nn] [+_n] [-_n]
|
||||
ppuusshhdd [--nn] [_d_i_r]
|
||||
Adds a directory to the top of the directory stack, or rotates
|
||||
the stack, making the new top of the stack the current working
|
||||
Adds a directory to the top of the directory stack, or rotates
|
||||
the stack, making the new top of the stack the current working
|
||||
directory. With no arguments, exchanges the top two directories
|
||||
and returns 0, unless the directory stack is empty. Arguments,
|
||||
and returns 0, unless the directory stack is empty. Arguments,
|
||||
if supplied, have the following meanings:
|
||||
--nn Suppresses the normal change of directory when adding
|
||||
directories to the stack, so that only the stack is
|
||||
--nn Suppresses the normal change of directory when adding
|
||||
directories to the stack, so that only the stack is
|
||||
manipulated.
|
||||
++_n Rotates the stack so that the _nth directory (counting
|
||||
from the left of the list shown by ddiirrss, starting with
|
||||
++_n Rotates the stack so that the _nth directory (counting
|
||||
from the left of the list shown by ddiirrss, starting with
|
||||
zero) is at the top.
|
||||
--_n Rotates the stack so that the _nth directory (counting
|
||||
from the right of the list shown by ddiirrss, starting with
|
||||
--_n Rotates the stack so that the _nth directory (counting
|
||||
from the right of the list shown by ddiirrss, starting with
|
||||
zero) is at the top.
|
||||
_d_i_r Adds _d_i_r to the directory stack at the top, making it the
|
||||
new current working directory.
|
||||
|
||||
If the ppuusshhdd command is successful, a ddiirrss is performed as well.
|
||||
If the first form is used, ppuusshhdd returns 0 unless the cd to _d_i_r
|
||||
fails. With the second form, ppuusshhdd returns 0 unless the direc-
|
||||
tory stack is empty, a non-existent directory stack element is
|
||||
specified, or the directory change to the specified new current
|
||||
If the first form is used, ppuusshhdd returns 0 unless the cd to _d_i_r
|
||||
fails. With the second form, ppuusshhdd returns 0 unless the direc-
|
||||
tory stack is empty, a non-existent directory stack element is
|
||||
specified, or the directory change to the specified new current
|
||||
directory fails.
|
||||
|
||||
ppwwdd [--LLPP]
|
||||
Print the absolute pathname of the current working directory.
|
||||
Print the absolute pathname of the current working directory.
|
||||
The pathname printed contains no symbolic links if the --PP option
|
||||
is supplied or the --oo pphhyyssiiccaall option to the sseett builtin command
|
||||
is enabled. If the --LL option is used, the pathname printed may
|
||||
contain symbolic links. The return status is 0 unless an error
|
||||
occurs while reading the name of the current directory or an
|
||||
is enabled. If the --LL option is used, the pathname printed may
|
||||
contain symbolic links. The return status is 0 unless an error
|
||||
occurs while reading the name of the current directory or an
|
||||
invalid option is supplied.
|
||||
|
||||
rreeaadd [--eerrss] [--aa _a_n_a_m_e] [--dd _d_e_l_i_m] [-- _t_e_x_t] [--nn _n_c_h_a_r_s] [--pp _p_r_o_m_p_t] [--tt
|
||||
rreeaadd [--eerrss] [--aa _a_n_a_m_e] [--dd _d_e_l_i_m] [-- _t_e_x_t] [--nn _n_c_h_a_r_s] [--pp _p_r_o_m_p_t] [--tt
|
||||
_t_i_m_e_o_u_t] [--uu _f_d] [_n_a_m_e ...]
|
||||
One line is read from the standard input, or from the file
|
||||
descriptor _f_d supplied as an argument to the --uu option, and the
|
||||
One line is read from the standard input, or from the file
|
||||
descriptor _f_d supplied as an argument to the --uu option, and the
|
||||
first word is assigned to the first _n_a_m_e, the second word to the
|
||||
second _n_a_m_e, and so on, with leftover words and their interven-
|
||||
ing separators assigned to the last _n_a_m_e. If there are fewer
|
||||
second _n_a_m_e, and so on, with leftover words and their interven-
|
||||
ing separators assigned to the last _n_a_m_e. If there are fewer
|
||||
words read from the input stream than names, the remaining names
|
||||
are assigned empty values. The characters in IIFFSS are used to
|
||||
split the line into words. The backslash character (\\) may be
|
||||
used to remove any special meaning for the next character read
|
||||
and for line continuation. Options, if supplied, have the fol-
|
||||
are assigned empty values. The characters in IIFFSS are used to
|
||||
split the line into words. The backslash character (\\) may be
|
||||
used to remove any special meaning for the next character read
|
||||
and for line continuation. Options, if supplied, have the fol-
|
||||
lowing meanings:
|
||||
--aa _a_n_a_m_e
|
||||
The words are assigned to sequential indices of the array
|
||||
@@ -849,52 +852,56 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
new values are assigned. Other _n_a_m_e arguments are
|
||||
ignored.
|
||||
--dd _d_e_l_i_m
|
||||
The first character of _d_e_l_i_m is used to terminate the
|
||||
The first character of _d_e_l_i_m is used to terminate the
|
||||
input line, rather than newline.
|
||||
--ee If the standard input is coming from a terminal, rreeaaddlliinnee
|
||||
(see RREEAADDLLIINNEE above) is used to obtain the line.
|
||||
--ii _t_e_x_t
|
||||
If rreeaaddlliinnee is being used to read the line, _t_e_x_t is
|
||||
If rreeaaddlliinnee is being used to read the line, _t_e_x_t is
|
||||
placed into the editing buffer before editing begins.
|
||||
--nn _n_c_h_a_r_s
|
||||
rreeaadd returns after reading _n_c_h_a_r_s characters rather than
|
||||
rreeaadd returns after reading _n_c_h_a_r_s characters rather than
|
||||
waiting for a complete line of input.
|
||||
--pp _p_r_o_m_p_t
|
||||
Display _p_r_o_m_p_t on standard error, without a trailing new-
|
||||
line, before attempting to read any input. The prompt is
|
||||
displayed only if input is coming from a terminal.
|
||||
--rr Backslash does not act as an escape character. The back-
|
||||
slash is considered to be part of the line. In particu-
|
||||
lar, a backslash-newline pair may not be used as a line
|
||||
slash is considered to be part of the line. In particu-
|
||||
lar, a backslash-newline pair may not be used as a line
|
||||
continuation.
|
||||
--ss Silent mode. If input is coming from a terminal, charac-
|
||||
ters are not echoed.
|
||||
--tt _t_i_m_e_o_u_t
|
||||
Cause rreeaadd to time out and return failure if a complete
|
||||
line of input is not read within _t_i_m_e_o_u_t seconds. _t_i_m_e_-
|
||||
_o_u_t may be a decimal number with a fractional portion
|
||||
following the decimal point. This option has no effect
|
||||
if rreeaadd is not reading input from the terminal or a pipe.
|
||||
Cause rreeaadd to time out and return failure if a complete
|
||||
line of input is not read within _t_i_m_e_o_u_t seconds. _t_i_m_e_-
|
||||
_o_u_t may be a decimal number with a fractional portion
|
||||
following the decimal point. This option is only effec-
|
||||
tive if rreeaadd is reading input from a terminal, pipe, or
|
||||
other special file; it has no effect when reading from
|
||||
regular files. The exit status is greater than 128 if
|
||||
the timeout is exceeded.
|
||||
--uu _f_d Read input from file descriptor _f_d.
|
||||
|
||||
If no _n_a_m_e_s are supplied, the line read is assigned to the vari-
|
||||
able RREEPPLLYY. The return code is zero, unless end-of-file is
|
||||
encountered, rreeaadd times out, or an invalid file descriptor is
|
||||
able RREEPPLLYY. The return code is zero, unless end-of-file is
|
||||
encountered, rreeaadd times out, or an invalid file descriptor is
|
||||
supplied as the argument to --uu.
|
||||
|
||||
rreeaaddoonnllyy [--aappff] [_n_a_m_e[=_w_o_r_d] ...]
|
||||
The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s
|
||||
may not be changed by subsequent assignment. If the --ff option
|
||||
is supplied, the functions corresponding to the _n_a_m_e_s are so
|
||||
marked. The --aa option restricts the variables to arrays. If no
|
||||
_n_a_m_e arguments are given, or if the --pp option is supplied, a
|
||||
list of all readonly names is printed. The --pp option causes
|
||||
output to be displayed in a format that may be reused as input.
|
||||
If a variable name is followed by =_w_o_r_d, the value of the vari-
|
||||
able is set to _w_o_r_d. The return status is 0 unless an invalid
|
||||
option is encountered, one of the _n_a_m_e_s is not a valid shell
|
||||
variable name, or --ff is supplied with a _n_a_m_e that is not a func-
|
||||
tion.
|
||||
rreeaaddoonnllyy [--aaAAppff] [_n_a_m_e[=_w_o_r_d] ...]
|
||||
The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s
|
||||
may not be changed by subsequent assignment. If the --ff option
|
||||
is supplied, the functions corresponding to the _n_a_m_e_s are so
|
||||
marked. The --aa option restricts the variables to indexed
|
||||
arrays; the --AA option restricts the variables to associative
|
||||
arrays. If no _n_a_m_e arguments are given, or if the --pp option is
|
||||
supplied, a list of all readonly names is printed. The --pp
|
||||
option causes output to be displayed in a format that may be
|
||||
reused as input. If a variable name is followed by =_w_o_r_d, the
|
||||
value of the variable is set to _w_o_r_d. The return status is 0
|
||||
unless an invalid option is encountered, one of the _n_a_m_e_s is not
|
||||
a valid shell variable name, or --ff is supplied with a _n_a_m_e that
|
||||
is not a function.
|
||||
|
||||
rreettuurrnn [_n]
|
||||
Causes a function to exit with the return value specified by _n.
|
||||
@@ -1286,10 +1293,10 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
sequences by default.
|
||||
ssuussppeenndd [--ff]
|
||||
Suspend the execution of this shell until it receives a SSIIGGCCOONNTT
|
||||
signal. The --ff option says not to complain if this is a login
|
||||
shell; just suspend anyway. The return status is 0 unless the
|
||||
shell is a login shell and --ff is not supplied, or if job control
|
||||
is not enabled.
|
||||
signal. A login shell cannot be suspended; the --ff option can be
|
||||
used to override this and force the suspension. The return sta-
|
||||
tus is 0 unless the shell is a login shell and --ff is not sup-
|
||||
plied, or if job control is not enabled.
|
||||
tteesstt _e_x_p_r
|
||||
[[ _e_x_p_r ]]
|
||||
Return a status of 0 or 1 depending on the evaluation of the
|
||||
|
||||
+721
-710
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,6 +1,6 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.19.2
|
||||
%%CreationDate: Thu May 29 11:48:42 2008
|
||||
%%CreationDate: Wed Jul 2 09:08:26 2008
|
||||
%%DocumentNeededResources: font Times-Roman
|
||||
%%+ font Times-Bold
|
||||
%%DocumentSuppliedResources: procset grops 1.19 2
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@
|
||||
Copyright (C) 1988-2008 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Sun Jun 29 22:41:25 EDT 2008
|
||||
@set LASTCHANGE Sun Jul 6 14:33:52 EDT 2008
|
||||
|
||||
@set EDITION 4.0
|
||||
@set VERSION 4.0
|
||||
@set UPDATED 29 June 2008
|
||||
@set UPDATED-MONTH June 2008
|
||||
@set UPDATED 6 July 2008
|
||||
@set UPDATED-MONTH July 2008
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@
|
||||
Copyright (C) 1988-2008 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Thu Jun 26 10:59:10 EDT 2008
|
||||
@set LASTCHANGE Thu Jul 3 14:56:28 EDT 2008
|
||||
|
||||
@set EDITION 4.0
|
||||
@set VERSION 4.0
|
||||
@set UPDATED 26 June 2008
|
||||
@set UPDATED-MONTH June 2008
|
||||
@set UPDATED 3 July 2008
|
||||
@set UPDATED-MONTH July 2008
|
||||
|
||||
Reference in New Issue
Block a user