Subject: Re: ksh vs. pd-ksh and bash
To: Christos Zoulas <christos@astron.com>
From: Louis Guillaume <lguillaume@berklee.edu>
List: netbsd-users
Date: 03/10/2007 01:43:52
Christos Zoulas wrote:
> In article <45F1D674.9080306@berklee.edu>,
> Louis Guillaume  <lguillaume@berklee.edu> wrote:
>> Hi,
>>
>> I'm trying to figure out a shell problem so that the script is portable.
>>
>> bash and pdksh seem to behave the same, but I think they're wrong. They
>> seem to run the `while' segment of the pipeline in a subshell. Or something.
>>
>> ksh88 does the right thing.
>>
>> Is there some good reason for bash's and pdksh's misbehaviour??
>>
>> Louis
> 
> According to the standards the shell is allowed to execute the loop
> in a subshell. Dependiing on it to be executed in the same shell is
> non-portable.
> 
> christos
> 

Ok. That's a real bummer. Is there a better way?

Louis