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: Greg Wooledge
Subject: Re: Array not defined when being set inline
Date: Tue, 10 Oct 2017 09:18:18 -0400
User-agent: NeoMutt/20170113 (1.7.2)

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 variable by the "-x"
in the output of declare.  And since it's an environment variable, it
is therefore a string variable, because you can't export arrays.

And it doesn't persist because it's a TEMPORARY variable.  It's just
there for the duration of that one command.

What are you trying to do?



reply via email to

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