[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to do? Possible?
From: |
Davide Brini |
Subject: |
Re: How to do? Possible? |
Date: |
Mon, 25 Jul 2011 23:59:54 +0200 |
User-agent: |
|
On Mon, 25 Jul 2011 14:28:52 -0700, Linda Walsh <address@hidden> wrote:
> Not really.
> It only seems that way because within () any "$xxxx" is usually
> expanded BEFORE the () starts from the parent....
>
> You can see this by
> GLOBAL="hi there"
> (echo $GLOBAL)
> prints out "hi there" as expected, but if we hide
> $GLOBAL so it isn't seen by parent:
> (foo=GLOBAL; echo ${!foo})
> prints ""
>
> So, they aren't really available in a subshell, only
> that a subshell's contents are evaluated before the subshell is
> called.
There is a distinction to make between exported and non-exported variables.
Also,
foo=bar command
is quite different from
foo=bar; command
(although sometimes, under certain conditions, they may appear to yield the
same result).
--
D.
- Re: How to do? Possible?, (continued)
- Re: How to do? Possible?, Linda Walsh, 2011/07/25
- Re: How to do? Possible?, Bob Proulx, 2011/07/25
- Re: How to do? Possible?, Linda Walsh, 2011/07/25
- Re: How to do? Possible?, Linda Walsh, 2011/07/25
- Re: How to do? Possible?, Eric Blake, 2011/07/25
- Re: How to do? Possible?, Linda Walsh, 2011/07/25
- Re: How to do? Possible?, Bob Proulx, 2011/07/25
- Re: How to do? Possible?, Dennis Williamson, 2011/07/25
- Re: How to do? Possible?, Bob Proulx, 2011/07/25
- Re: How to do? Possible?, Dennis Williamson, 2011/07/26
- Re: How to do? Possible?,
Davide Brini <=
- Re: How to do? Possible?, Pierre Gaston, 2011/07/25
Re: How to do? Possible?, Steven W. Orr, 2011/07/25