Re: Changing the way bash expands associative array subscripts

2021-03-29 Thread Marco Ippolito
> Examples are more for the texinfo documentation; the man page is big > enough already. What goes in the man page Vs in the texinfo documentation, please?

Re: -e test description in the GNU Bash 5.0 man page from 7 December 2018

2019-10-21 Thread Marco Ippolito
On 21/10/2019 11:11, Andreas Schwab wrote: On Okt 21 2019, Marco Ippolito wrote: In the GNU Bash 5.0 man page from 7 December 2018 the -e test is documented as such:    -e file   True if file exists. When "file" is a symlink name to a non-existing target, the -e

-e test description in the GNU Bash 5.0 man page from 7 December 2018

2019-10-20 Thread Marco Ippolito
In the GNU Bash 5.0 man page from 7 December 2018 the -e test is documented as such:    -e file   True if file exists. When "file" is a symlink name to a non-existing target, the -e test fails, and this may be surprising from just reading the documentation. By contrast, POSIX

Add support for array .pop()

2016-10-15 Thread Marco Ippolito
Bash has elegant and powerful constructs like `mapfile', yet it is missing something as easy as an array "pop". Extract the last value of an array at the same time as removing it from the array. Is this the best one can do? $ a=(1 2 3); v=${a[-1]}; unset 'a[-1]'; printf '%s\n' "$v" "${a[@]}" Th