Re: Bash 4.1 doesn't behave as I think it should: arrays and the environment

2012-08-19 Thread Stephane Chazelas
2012-08-17 17:18:12 -0400, Greg Wooledge: > On Fri, Aug 17, 2012 at 03:19:56PM +0800, John Summerfield wrote: > > In two cases I wish to pass an array in the environment, like so: > > 14:28 john@Boomer$ STUFF[1]=one STUFFX=stuffx env | grep ^ST > > STUFFX=stuffx > > STUFF[1]=one > > You are creati

Re: Bash 4.1 doesn't behave as I think it should: arrays and the environment

2012-08-18 Thread Pierre Gaston
On Fri, Aug 17, 2012 at 10:19 AM, John Summerfield wrote: (...) > The man page for bash contains a para entitled ENVIRONMENT which doesn't > mention arrays, leaving the reader to assume they are not different from > other shell variables. the BUGS section contains: Array variables may not (yet) b

Re: Bash 4.1 doesn't behave as I think it should: arrays and the environment

2012-08-17 Thread Greg Wooledge
On Fri, Aug 17, 2012 at 03:19:56PM +0800, John Summerfield wrote: > In two cases I wish to pass an array in the environment, like so: > 14:28 john@Boomer$ STUFF[1]=one STUFFX=stuffx env | grep ^ST > STUFFX=stuffx > STUFF[1]=one You are creating an environment variable called "STUFF[1]". This is a

Bash 4.1 doesn't behave as I think it should: arrays and the environment

2012-08-17 Thread John Summerfield
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent per