bug-bash
[Top][All Lists]
Advanced

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

Re: inconsistency with "readonly" and scope


From: Chet Ramey
Subject: Re: inconsistency with "readonly" and scope
Date: Thu, 12 Apr 2012 08:27:23 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

On 4/11/12 4:12 PM, dethrophes wrote:

> I've also noticed weird behavior with "declare -gr" the r sometimes seems
> to override the g, but not specific to functions It seems to be specific
> either to the source file or to the compound statement. I haven't been able
> to figure out exactly whats going on there. I haven't been able to
> reproduce it in a simple example. this is most readily noticeable with set
> -o nounset

An example would help.  The above is supposed to create a global readonly
variable.  I suspect that you see the `global' as being `overridden'
because it's being created in a subshell environment.

Chet



-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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