On 2/23/10 4:23 AM, t...@icada.com 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    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/


Reply via email to