bug-bash
[Top][All Lists]
Advanced

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

Re: Assigning variable value in right behalf of pipeline has no effect


From: Paul Jarc
Subject: Re: Assigning variable value in right behalf of pipeline has no effect
Date: Thu, 05 Jul 2007 13:09:57 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

xandrous@gmail.com wrote:
> XXX=10; { XXX=20; } | read; echo $XXX
>
> XXX=10; { XXX=20; }; echo $XXX
>
> I suppose both of them should output  '20' but the first one outputs
> '10'. Is it feature of bug?

This is normal.  It's explained in entry E4 in the bash FAQ.


paul




reply via email to

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