|
| From: | Paul Jarc |
| Subject: | Re: Assigning variable value in right behalf of pipeline has no effect |
| Date: | Thu, 05 Jul 2007 14:18:44 -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
>
> It's clear that 'read' is executed as an separate process and its
> result (REPLY variable value) is lost but 'XXX=20' command is done by
> the same process as 'XXX=10'.
No, every element of a pipeline is executed in its own process. So
the only commands that are executed in the main shell process are
"XXX=10" and "echo $XXX".
paul
| [Prev in Thread] | Current Thread | [Next in Thread] |