On Mon, Apr 9, 2012 at 7:22 AM, Greg Wooledge
<address@hidden> wrote:
At this point, you're doing something odd. Â You're using "$@" syntax
(which results in multiple words), but you're doing it on the right-hand
side of an assignment, which means you're forcing there to be just one
word. Â The two are fundamentally incompatible, and in this case, the
assignment (forcing one word) wins.
Thank You Greg.
I suggest then that this is a weak spot in the docs.
 Parameter Expansion
      ${parameter:offset}
      ${parameter:offset:length}
If parameter is an indexed array name subscripted by @ or *, the result is the length members of the array beginning with ${parameter[offset]}.
This makes no distinction between @ and *, and never mentions IFS. It never occurred to me to try * due to the docs.
Reading this section also made me think it was talking about each array element converted to a character string and then the strings concatenated, when now I realize that the output is perfectly suitable to put inside ( ) to actually assign the sliced elements to another array. In that context the spaces make perfect sense.
A few examples sprinkled in man bash would go a long way towards clarifying things.
Â
IFS is only used by the "$*" notation, not by the "$@" notation.
I never realized that IFS was * only. Thanks for that nugget.