[Top][All Lists]

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

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

From: Andreas Kusalananda Kähäri
Subject: Re: lastpipe and "*may* be run by the shell process"
Date: Tue, 12 May 2020 00:03:21 +0200

On Mon, May 11, 2020 at 04:57:16PM -0400, Chet Ramey wrote:
> 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.

So it is, and so it says later in the manual.  Duh.  I should go to bed.

Thanks!  And sorry for the noise.

Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden


reply via email to

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