[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "unset var" pops var off variable stack instead of unsetting it
From: |
Chet Ramey |
Subject: |
Re: "unset var" pops var off variable stack instead of unsetting it |
Date: |
Mon, 20 Mar 2017 16:32:10 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 3/20/17 4:29 PM, Stephane Chazelas wrote:
>> I believe he means the behavior of `a=0; a=1 eval unset a', which Posix
>> implicitly requires affect the global scope and results in a being unset
>> when the statement completes.
> [...]
>
> See also:
>
> $ bash -c 'f() { unset a; echo "$a";}; a=1; a=2 f'
> 1
>
> already mentioned.
A distinction without a difference; the behavior is explicitly the same.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- "unset var" pops var off variable stack instead of unsetting it, Stephane Chazelas, 2017/03/17
- Re: "unset var" pops var off variable stack instead of unsetting it, Grisha Levit, 2017/03/17
- Re: "unset var" pops var off variable stack instead of unsetting it, Dan Douglas, 2017/03/17
- Re: "unset var" pops var off variable stack instead of unsetting it, Stephane Chazelas, 2017/03/17
- Re: "unset var" pops var off variable stack instead of unsetting it, Chet Ramey, 2017/03/18
- Re: "unset var" pops var off variable stack instead of unsetting it, Eric Blake, 2017/03/20
- Re: "unset var" pops var off variable stack instead of unsetting it, Chet Ramey, 2017/03/20
- Re: "unset var" pops var off variable stack instead of unsetting it, Stephane Chazelas, 2017/03/20
- Re: "unset var" pops var off variable stack instead of unsetting it,
Chet Ramey <=
- Re: "unset var" pops var off variable stack instead of unsetting it, Stephane Chazelas, 2017/03/21
- Re: "unset var" pops var off variable stack instead of unsetting it, Martijn Dekker, 2017/03/22
Re: "unset var" pops var off variable stack instead of unsetting it, Chet Ramey, 2017/03/18
Re: "unset var" pops var off variable stack instead of unsetting it, Chet Ramey, 2017/03/18