diff -u bash-4.2.is/doc/bashref.texi bash-4.2.new/doc/bashref.texi --- bash-4.2.is/doc/bashref.texi 2011-01-16 21:31:57.000000000 +0100 +++ bash-4.2.new/doc/bashref.texi 2011-09-11 10:36:29.000000000 +0200 @@ -6234,13 +6246,13 @@ 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 (@pxref{Shell Arithmetic}) and are zero-based; +expressions (@pxref{Shell Arithmetic})) and are zero-based; associative arrays use arbitrary strings. An indexed array is created automatically if any variable is assigned to using the syntax @example -name[@var{subscript}]=@var{value} +@var{name}[@var{subscript}]=@var{value} @end example @noindent @@ -6271,13 +6283,13 @@ @code{readonly} builtins. Each attribute applies to all members of an array. -Arrays are assigned to using compound assignments of the form +Arrays are assigned to by using compound assignments of the form @example -name=(value@var{1} @dots{} value@var{n}) +@var{name}=(@var{value1} @var{value2} @dots{}) @end example @noindent where each -@var{value} is of the form @code{[@var{subscript}]=}@var{string}. +@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; @@ -6288,29 +6300,29 @@ This syntax is also accepted by the @code{declare} builtin. Individual array elements may be assigned to using the -@code{name[}@var{subscript}@code{]=}@var{value} syntax introduced above. +@code{@var{name}[@var{subscript}]=@var{value}} syntax introduced above. Any element of an array may be referenced using -@code{$@{name[}@var{subscript}@code{]@}}. +@code{$@{@var{name}[@var{subscript}]@}}. The braces are required to avoid conflicts with the shell's filename expansion operators. If the @var{subscript} is @samp{@@} or @samp{*}, the word expands to all members of the array @var{name}. These subscripts differ only when the word appears within double quotes. If the word is double-quoted, -@code{$@{name[*]@}} expands to a single word with +@code{$@{@var{name}[*]@}} expands to a single word with the value of each array member separated by the first character of the -@env{IFS} variable, and @code{$@{name[@@]@}} expands each element of +@env{IFS} variable, and @code{$@{@var{name}[@@]@}} expands each element of @var{name} to a separate word. When there are no array members, -@code{$@{name[@@]@}} expands to nothing. +@code{$@{@var{name}[@@]@}} expands to nothing. If the double-quoted expansion occurs within a word, the expansion of the first parameter is joined with the beginning part of the original word, and the expansion of the last parameter is joined with the last part of the original word. This is analogous to the expansion of the special parameters @samp{@@} and @samp{*}. -@code{$@{#name[}@var{subscript}@code{]@}} expands to the length of -@code{$@{name[}@var{subscript}@code{]@}}. +@code{$@{#@var{name}[@var{subscript}]@}} expands to the length of +@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 @@ -6320,12 +6332,12 @@ value. The null string is a valid value. The @code{unset} builtin is used to destroy arrays. -@code{unset} @var{name}[@var{subscript}] +@code{unset @var{name}[@var{subscript}]} destroys the array element at index @var{subscript}. Care must be taken to avoid unwanted side effects caused by filename expansion. -@code{unset} @var{name}, where @var{name} is an array, removes the -entire array. A subscript of @samp{*} or @samp{@@} also removes the +@code{unset @var{name}}, where @var{name} is an array, removes the +entire array. A subscript of @samp{*} or @samp{@@} also removes the entire array. The @code{declare}, @code{local}, and @code{readonly}