Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14931 > unrolled thread
| Started by | Bize Ma <binaryzebra@gmail.com> |
|---|---|
| First post | 2018-12-19 22:31 -0500 |
| Last post | 2018-12-19 22:31 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
Error on arithmetic evaluation of `~0`. Bize Ma <binaryzebra@gmail.com> - 2018-12-19 22:31 -0500
| From | Bize Ma <binaryzebra@gmail.com> |
|---|---|
| Date | 2018-12-19 22:31 -0500 |
| Subject | Error on arithmetic evaluation of `~0`. |
| Message-ID | <mailman.5985.1545276710.1284.bug-bash@gnu.org> |
This is the third time I am reporting this issue.
This fails:
var=(hello); echo "${var[~0]}"
syntax error: operand expected ...
While this works:
var=(hello); echo "${var[ ~0]}"
hello
It is also interesting that this fails:
var=hello; echo "${var[ ~0]}"
bash: var: bad array subscript
Isn't `var[0]` valid and equivalent to `var` ?
This was "supposed" to be resolved in a dev version,
but is still present on bash 5.
Back to top | Article view | gnu.bash.bug
csiph-web