Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14539 > unrolled thread
| Started by | Grisha Levit <grishalevit@gmail.com> |
|---|---|
| First post | 2018-08-27 12:25 -0400 |
| Last post | 2018-08-27 12:25 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
bash 5.0 nested array subscript arithmetic expansion error Grisha Levit <grishalevit@gmail.com> - 2018-08-27 12:25 -0400
| From | Grisha Levit <grishalevit@gmail.com> |
|---|---|
| Date | 2018-08-27 12:25 -0400 |
| Subject | bash 5.0 nested array subscript arithmetic expansion error |
| Message-ID | <mailman.6.1535387145.1284.bug-bash@gnu.org> |
This used to work:
bash-4.4$ a=0
bash-4.4$ echo $(( a[a[0]] ))
0
bash-4.4$ echo ${a[a[a[0]]]}
0
But is broken in bash-5.0:
bash-5.0$ a=0
bash-5.0$ echo ${a[a[a[0]]]}
bash: a[a[0]]: syntax error: invalid arithmetic operator (error token is "]")
bash-5.0$ echo $(( a[a[0]] ))
bash: a[a[0]] : syntax error: invalid arithmetic operator (error token is "] ")
Back to top | Article view | gnu.bash.bug
csiph-web