bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Array not defined when being set inline


From: Chet Ramey
Subject: Re: Array not defined when being set inline
Date: Tue, 10 Oct 2017 09:35:26 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

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 when it
reads a non-assignment word that it becomes a temporary assignment
preceding a simple command.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]