bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cannot declare local variables if they're readonly


From: Greg Wooledge
Subject: Re: cannot declare local variables if they're readonly
Date: Thu, 23 Jul 2015 11:04:26 -0400
User-agent: Mutt/1.4.2.3i

On Thu, Jul 23, 2015 at 04:57:42PM +0200, isabella parakiss wrote:
> The fact is, I found out this by using BASH_REMATCH, trying to use it in
> different functions without interfering with each other.

Ah!  That changes things. :)

imadev:~$ [[ x =~ y ]]
imadev:~$ declare -p BASH_REMATCH
declare -ar BASH_REMATCH='()'
imadev:~$ f() { local BASH_REMATCH; [[ y =~ z ]]; } ; f
bash: local: BASH_REMATCH: readonly variable

Chet will have to address this further.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]