[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: command substitution subshell exits when assigning to readonly varia
From: |
Chet Ramey |
Subject: |
Re: command substitution subshell exits when assigning to readonly variable |
Date: |
Thu, 19 Oct 2023 09:29:53 -0400 |
User-agent: |
Mozilla Thunderbird |
On 10/19/23 9:18 AM, Greg Wooledge wrote:
It was never intended for making "const" variables in scripts.
This isn't true; that was its original purpose. Bourne's papers on his
v7 shell, including the ones in BSTJ and the 7th edition manual, say
"a name whose value is intended to remain constant may be declared
readonly."
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/