help-bash
[Top][All Lists]
Advanced

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

Re: lastpipe and "*may* be run by the shell process"


From: Chet Ramey
Subject: Re: lastpipe and "*may* be run by the shell process"
Date: Mon, 11 May 2020 16:57:16 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 5/11/20 3:15 PM, Andreas Kusalananda Kähäri wrote:
> Hi,
> 
> I was recently answering a bash-related query in another context, and
> found myself quoting the bash (5.0.17(1)-release) manual:
> 
>         Each command  in a  pipeline is  executed as  a separate
>         process (i.e.,  in a  subshell).  See  COMMAND EXECUTION
>         ENVIRONMENT for a description of a subshell environment.
>         If  the  lastpipe  option  is enabled  using  the  shopt
>         builtin (see  the description of shopt  below), the last
>         element of a pipeline may be run by the shell process.
> 
> What caught my eye was the word "may" in the last sentence, and it
> struck me that I couldn't immediately think of a case where this word
> couldn't be "will" instead.  That is to say, where setting the lastpipe
> shell option did *not* cause the last part of a pipeline to run in the
> invoking shell environment.

If job control is enabled.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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