bug-bash
[Top][All Lists]
Advanced

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

Re: bash: variables inside 'while'


From: Sven Mascheck
Subject: Re: bash: variables inside 'while'
Date: 31 Aug 2001 14:50:01 +0200
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))

Gabriel Zachmann <address@hidden> wrote:
> Paul Jarc wrote:
>> address@hidden (Gabriel Zachmann) wrote:
>>>     cat file | while read p l [...]

>>  [FAQ] Each element of a pipeline is run in a separate process

> hm, but why does bash do this differently than ksh?

ksh88 and ksh93 do not fork() for the last element of a pipeline,
if it is a builtin.  As a side effect, you get this "shell execution
environment" goodie.

I wonder if there are drawbacks, that prevented bash and pdksh
from implementing this (but inheriting the Bourne Shell behaviour)?
Not even for the sake of the environment, but for just saving a fork().

Sven



reply via email to

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