Re: Arithmetic expansion bug.

2018-02-11 Thread Chet Ramey
On 2/10/18 2:57 PM, Isaac Marcos wrote: > There is a bug when expanding this math: > > $ echo "$((~0))" > bash: /home/user: syntax error: operand expected (error token is > "/home/user") > > It works correctly when an space is added: > > $ echo "$(( ~0 ))" > -1 Thanks for the

Re: Unexpected (?) segfault after unset LANG

2018-02-11 Thread Chet Ramey
On 2/9/18 11:53 AM, mike b wrote: > Indeed, with build from devel it doesn't segfault anymore. Just out of pure > curiosity, which commit introduced a fix for that? Aaand, there's one more > thing that puzzles me a bit: > > # echo $BASH_VERSION > 5.0.12(1)-alpha > # echo ${LANG:-bleh} > bleh

Unset array doesn't work

2018-02-11 Thread Nikolai Kondrashov
Hi everyone, I think I'm hitting a bug in Bash 4.4.12 (on Debian Stable): at some point an "unset" of a global array variable doesn't work inside a function, in "dkms" script from DKMS package. Adding another "unset" of the same variable next to it fixes the issue. Does this sound familiar to

Re: Unset array doesn't work

2018-02-11 Thread Chet Ramey
On 2/11/18 1:06 PM, Nikolai Kondrashov wrote: > Hi everyone, > > I think I'm hitting a bug in Bash 4.4.12 (on Debian Stable): at some point > an "unset" of a global array variable doesn't work inside a function, in > "dkms" script from DKMS package. Adding another "unset" of the same variable >

Re: Unset array doesn't work

2018-02-11 Thread Nikolai Kondrashov
Hi Chet, On 02/12/2018 01:31 AM, Chet Ramey wrote: On 2/11/18 1:06 PM, Nikolai Kondrashov wrote: Hi everyone, I think I'm hitting a bug in Bash 4.4.12 (on Debian Stable): at some point an "unset" of a global array variable doesn't work inside a function, in "dkms" script from DKMS package.

Re: Unset array doesn't work

2018-02-11 Thread Nikolai Kondrashov
On 02/12/2018 08:41 AM, Nikolai Kondrashov wrote: inner() { unset res Oh, and duplicating this line fixes the issue. Nick

Re: Unset array doesn't work

2018-02-11 Thread Clark Wang
On Mon, Feb 12, 2018 at 2:45 PM, Nikolai Kondrashov wrote: > On 02/12/2018 08:41 AM, Nikolai Kondrashov wrote: > >> inner() { >> unset res >> > > Oh, and duplicating this line fixes the issue. > Take a look at these links: -

Re: Unset array doesn't work

2018-02-11 Thread Nikolai Kondrashov
On 02/12/2018 09:06 AM, Clark Wang wrote: On Mon, Feb 12, 2018 at 2:45 PM, Nikolai Kondrashov > wrote: On 02/12/2018 08:41 AM, Nikolai Kondrashov wrote: inner() { unset res Oh, and duplicating this line