[jik@jik installer]$ echo $BASH_VERSION
2.04.4(1)-release
[jik@jik installer]$ GROUPS=foo
[jik@jik installer]$ echo $GROUPS; GROUPS=foo; echo $GROUPS
3009
foo
There are two different problems here:
1) It is exceedingly bogus that attempts to modify the GROUPS variable
are silently ignored. If bash is going to make the variable
read-only, then it should make the variable read-only, darn it, and
attempts to assign values to it should cause an errors. I spent hours
and hours tracking down wrong behavior in a script which used a
variable named GROUPS and couldn't understand why it wasn't getting
set properly.
2) Bash isn't even consistent about enforcing the read-only
restriction on this variable. As shown above, after you echo it once,
you can change its value. I assume that this behavior is
unintentional?
jik