bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Namespace problem with pipe into a braced group


From: Chet Ramey
Subject: Re: Namespace problem with pipe into a braced group
Date: Tue, 23 Feb 2010 21:40:47 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1

On 2/23/10 4:23 AM, address@hidden wrote:

> Description:
>       I would have expected the output to be 2 in both cases.  My mistake or 
> yours?  :-)
> 
> Repeat-By:
>       a=1; echo foo;{ a=2; }; echo $a         # output: 2
>       a=1; echo foo|{ a=2; }; echo $a         # output: 1

Yours.  Please read the Bash FAQ, question E4.


-- 
``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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]