Re: [Bug] Array declaration only includes first element

2024-07-18 Thread Lawrence Velázquez
On Thu, Jul 18, 2024, at 8:57 AM, Greg Wooledge wrote: > $a is equivalent to ${a[0]}. This is documented, by the way. It is not a bug. "Referencing an array variable without a subscript is equivalent to referencing with a subscript of 0." https://www.gnu.org/software/bash/manual/html_node/Arra

Re: [Bug] Array declaration only includes first element

2024-07-18 Thread Greg Wooledge
On Thu, Jul 18, 2024 at 00:00:17 +, Charles Dong via Bug reports for the GNU Bourne Again SHell wrote: > - Declare an array: `a=(aa bb cc dd)` > - Print this array: `echo $a` or `printf $a` $a is equivalent to ${a[0]}. That's not how you print an entire array. The easiest way to print an ar