On 10/10/17 9:06 AM, Dan Douglas wrote:
> Bash parses the array assignment as though it were valid while reading
> words, assignments, and redirects of the command.
Because at the time the parser reads the assignment, it has to assume
that it's a candidate for compound assignment. It's only whe
On Tue, Oct 10, 2017 at 09:05:55AM -0400, shawn wilson wrote:
> Nope, I knew how to correct it (as I showed in the last example), I
> just figured the other two should work.
"Work" how? You placed a variable in the TEMPORARY execution ENVIRONMENT
of a command. You can tell it's an environment va
On 10/10/2017 07:00 AM, shawn wilson wrote:
> I guess that's the right way to describe what I'm seeing:
>
> [swilson@localhost ~]$ unset f; f=(aaa bbb ccc) declare -p f
> declare -x f="(aaa bbb ccc)"
> [swilson@localhost ~]$ unset f; f=("aaa" "bbb" "ccc") declare -p f
> declare -x f="(aaa bbb ccc)
On Tue, Oct 10, 2017 at 8:21 AM, Greg Wooledge wrote:
> On Tue, Oct 10, 2017 at 08:00:58AM -0400, shawn wilson wrote:
>> I guess that's the right way to describe what I'm seeing:
>>
>> [swilson@localhost ~]$ unset f; f=(aaa bbb ccc) declare -p f
>> declare -x f="(aaa bbb ccc)"
>
> You placed a str
On Tue, Oct 10, 2017 at 08:00:58AM -0400, shawn wilson wrote:
> I guess that's the right way to describe what I'm seeing:
>
> [swilson@localhost ~]$ unset f; f=(aaa bbb ccc) declare -p f
> declare -x f="(aaa bbb ccc)"
You placed a string variable in the temporary execution environment of
the decl
I guess that's the right way to describe what I'm seeing:
[swilson@localhost ~]$ unset f; f=(aaa bbb ccc) declare -p f
declare -x f="(aaa bbb ccc)"
[swilson@localhost ~]$ unset f; f=("aaa" "bbb" "ccc") declare -p f
declare -x f="(aaa bbb ccc)"
[swilson@localhost ~]$ unset f; f=(aaa bbb ccc)
[swils