With the next release, in bash mode, the last process of a pipeline will be
run in a subshell.

I also added the lastpipe option.



On Fri, Jul 18, 2014 at 4:50 AM, Dan Douglas <[email protected]> wrote:

> On Friday, July 18, 2014 10:35:20 AM Philippe Bergheaud wrote:
> > Builtins in the last part of a pipeline are executed in a subshell by
> > bash, in the current shell by ksh, even in bash mode. Should ksh emulate
> > the (poor) implementation of bash pipelines, for compatibility, when
> > running as bash?
>
> You're better off getting Bash 4.2 or higher and using `shopt -s lastpipe`.
> Bash is the only shell that actually gives you an option. Ideally ksh
> should
> have the same shopt.
>
> Unfortunately lastpipe is off by default even in current versions, so if
> you
> want compatibility it has to be set in every script. It's already true of
> extglob anyway so I just make a habit of always setting both.
>
> --
> Dan Douglas
>
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to