[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BASH_SUBSHELL documentation misleading
From: |
Marc Herbert |
Subject: |
Re: BASH_SUBSHELL documentation misleading |
Date: |
Thu, 24 Mar 2011 14:33:19 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 |
Le 23/03/2011 20:28, Chet Ramey a écrit :
> On 3/23/11 4:15 PM, Sam Liddicott wrote:
>
>> Yes. But a new subshell environment has been spawned. Each time that
>> happens BASH_SUBSHELL should increase.
>>
>> Of course I know how it does work, but the man page isn't clear. It doesn't
>> say that the increase is only visible within the subshell and therefore it
>> is a measurement of subshell depth.
>
> OK. What wording would you like to see?
>
I would also like to see this example in the documentation:
$ ( echo sub-$BASH_SUBSHELL ); echo main-$BASH_SUBSHELL
sub-1
main-0
This example answers all doubts raised in this discussion. It also
hints at the fact that:
( echo 'sub-$BASH_SUBSHELL' )
does not work like an inexperienced quoter could wrongly assume.
- BASH_SUBSHELL documentation misleading, Sam Liddicott, 2011/03/23
- Re: BASH_SUBSHELL documentation misleading, Chris F.A. Johnson, 2011/03/23
- Re: BASH_SUBSHELL documentation misleading, Sam Liddicott, 2011/03/23
- Re: BASH_SUBSHELL documentation misleading,
Marc Herbert <=
- Re: BASH_SUBSHELL documentation misleading, Greg Wooledge, 2011/03/24
- Re: BASH_SUBSHELL documentation misleading, Marc Herbert, 2011/03/24
- Re: BASH_SUBSHELL documentation misleading, Greg Wooledge, 2011/03/24
- Re: BASH_SUBSHELL documentation misleading, Clark J. Wang, 2011/03/24
- Re: BASH_SUBSHELL documentation misleading, Maarten Billemont, 2011/03/23