Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14931
| From | Bize Ma <binaryzebra@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Error on arithmetic evaluation of `~0`. |
| Date | 2018-12-19 22:31 -0500 |
| Message-ID | <mailman.5985.1545276710.1284.bug-bash@gnu.org> (permalink) |
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 gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Error on arithmetic evaluation of `~0`. Bize Ma <binaryzebra@gmail.com> - 2018-12-19 22:31 -0500
csiph-web