[Top][All Lists]

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

"GROUPS" is read-only, but only sort of

From: Jonathan Kamens
Subject: "GROUPS" is read-only, but only sort of
Date: Fri, 3 Nov 2000 11:27:55 -0500

address@hidden installer]$ echo $BASH_VERSION
address@hidden installer]$ GROUPS=foo
address@hidden installer]$ echo $GROUPS; GROUPS=foo; echo $GROUPS

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


reply via email to

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