[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Can anyone explain this?
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Can anyone explain this? |
Date: |
Fri, 04 May 2012 20:43:01 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 |
On 5/4/12 6:25 PM, Dan Douglas wrote:
> It also appears seting a readonly variable to null is inconsistent with
> other types of assignment.
>
> $ ( declare -r x; declare -p x )
> -bash: declare: x: not found
> $ ( declare -r x=; declare -p x )
> declare -r x=""
A variable is not set unless it has been assigned a value. The empty
string is a valid value.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/