Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11932
| From | ziyunfei <446240525@qq.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | An array variable created by export/readonly builtins inside a function becomes a locale variable to that function unexpectedly |
| Date | 2015-11-28 11:18 +0800 |
| Message-ID | <mailman.851.1448702301.31583.bug-bash@gnu.org> (permalink) |
$ ksh -c 'foo() { readonly a=(1);echo a=$a; }; foo; echo a=$a'
a=1
a=1
$ bash -c 'foo() { readonly a=(1);echo a=$a; }; foo; echo a=$a' # a becomes a local variable
a=1
a=
Back to gnu.bash.bug | Previous | Next | Find similar
An array variable created by export/readonly builtins inside a function becomes a locale variable to that function unexpectedly ziyunfei <446240525@qq.com> - 2015-11-28 11:18 +0800
csiph-web