[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bash does not export arrays correctly
From: |
Dmitry V. Golovashkin (DVG) |
Subject: |
Bash does not export arrays correctly |
Date: |
30 Jan 2002 16:57:51 -0500 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -I. -I. -I./include -I./lib -I/usr/include -O2
-march=i386 -mcpu=i686
uname output: Linux d3338.us.sas.com 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001
i686 unknown
Machine Type: i386-redhat-linux-gnu
Bash Version: 2.04
Patch Level: 21
Release Status: release
Description:
Folks! somehow my Bash does not export arrays correctly
to non-interactive shells.
Repeat-By:
I have the following statement in my .bashrc (which is
read by login shell)
...
declare -ax some_array=([0]=one [1]=two)
...
and all interactive sub-shells see this, but whenever i invoke
a script - this `some_array' vanishes into the air.
Functions and simple parameters (not arrays) are exported
just fine, and nicely visible...
Substituting `declare -ax' by the old friend `export -a'
did not help.
Hopefully, I did not botch anything up here, and you will be able to
repeat the problem - if not - let me know I'd be happy to send
my bash startup files and provide more details.
Sincerely yours,
Dmitry Golovashkin
- Bash does not export arrays correctly,
Dmitry V. Golovashkin (DVG) <=