On Tue, Oct 10, 2017 at 8:21 AM, Greg Wooledge <wool...@eeg.ccf.org> 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 string variable in the temporary execution environment of > the declare command. If you wanted an actual array variable that would > persist past this command, you need a semicolon or newline after the > assignment, and before the declare command. >
Nope, I knew how to correct it (as I showed in the last example), I just figured the other two should work. > > See also: http://mywiki.wooledge.org/BashFAQ/104 Thanks for that (and the link it provides to BashParser - I'm going to have to digest that). Is there a way to detect that the parser has already processed a temporary variable and maybe change the exit status or something?