Re: Is it possible to export a bash array variable?
From:
Chet Ramey
Subject:
Re: Is it possible to export a bash array variable?
Date:
Mon, 5 Jan 2026 10:45:24 -0500
User-agent:
Mozilla Thunderbird
On 1/3/26 11:20 AM, Stan Marsh wrote:
There is a new thread in bug-bash about exporting arrays, which is the
inspiration for
this thread.
I did not know it was possible to do this. The search engines are convinced
that it is
not, but they may be (as they usually are) out-of-date. In fact, they quote
Chet as
saying it doesn't make any sense to (want to) do this.
Is it possible?
It's not supported, but there is a compile-time option you can enable that
made it work at some point in the past. If you want to try it, define
ARRAY_EXPORT in config-top.h.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/