mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 10:12:38 +02:00
commit bash-20141128 snapshot
This commit is contained in:
+40
-2
@@ -2186,6 +2186,40 @@ 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.
|
||||
|
||||
@item $@{@var{parameter}@@@var{operator}@}
|
||||
The expansion is either a transformation of the value of @var{parameter}
|
||||
or information about @var{parameter} itself, depending on the value of
|
||||
@var{operator}. Each @var{operator} is a single letter:
|
||||
|
||||
@table @code
|
||||
@item Q
|
||||
The expansion is a string that is the value of @var{parameter} quoted in a
|
||||
format that can be reused as input.
|
||||
@item E
|
||||
The expansion is a string that is the value of @var{parameter} with backslash
|
||||
escape sequences expanded as with the @code{$'@dots{}'} quoting mechansim.
|
||||
@item P
|
||||
The expansion is a string that is the result of expanding the value of
|
||||
@var{parameter} as if it were a prompt string (@pxref{Controlling the Prompt}).
|
||||
@item A
|
||||
The expansion is a string in the form of a @code{declare} command that, if
|
||||
evaluated, will recreate @var{parameter} with its attributes and value.
|
||||
@item a
|
||||
The expansion is a string consisting of flag values representing
|
||||
@var{parameter}'s attributes.
|
||||
@end table
|
||||
|
||||
If @var{parameter} is @samp{@@} or @samp{*},
|
||||
the 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 operation is applied to each member of the
|
||||
array in turn, and the expansion is the resultant list.
|
||||
|
||||
The result of the expansion is subject to word splitting and pathname
|
||||
expansion as described below.
|
||||
@end table
|
||||
|
||||
@node Command Substitution
|
||||
@@ -5185,6 +5219,7 @@ performing filename expansion.
|
||||
If set, Bash matches patterns in a case-insensitive fashion when
|
||||
performing matching while executing @code{case} or @code{[[}
|
||||
conditional commands,
|
||||
when performing pattern substitution word expansions,
|
||||
or when filtering possible completions as part of programmable completion.
|
||||
|
||||
@item nullglob
|
||||
@@ -6864,8 +6899,6 @@ expansion of the special parameters @samp{@@} and @samp{*}.
|
||||
@code{$@{@var{name}[@var{subscript}]@}}.
|
||||
If @var{subscript} is @samp{@@} or
|
||||
@samp{*}, the expansion is the number of elements in the array.
|
||||
Referencing an array variable without a subscript is equivalent to
|
||||
referencing with a subscript of 0.
|
||||
If the @var{subscript}
|
||||
used to reference an element of an indexed array
|
||||
evaluates to a number less than zero, it is
|
||||
@@ -6873,6 +6906,11 @@ interpreted as relative to one greater than the maximum index of the array,
|
||||
so negative indices count back from the end of the array,
|
||||
and an index of -1 refers to the last element.
|
||||
|
||||
Referencing an array variable without a subscript is equivalent to
|
||||
referencing with a subscript of 0.
|
||||
Any reference to a variable using a valid subscript is legal, and
|
||||
@code{bash} will create an array if necessary.
|
||||
|
||||
An array variable is considered set if a subscript has been assigned a
|
||||
value. The null string is a valid value.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user