bug-bash
[Top][All Lists]
Advanced

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

Re: false ; a=$?|more; echo $a


From: Paul Jarc
Subject: Re: false ; a=$?|more; echo $a
Date: Sun, 09 Jun 2002 16:31:47 -0400
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu)

Dan Jacobson <address@hidden> wrote:
> I suppose $? in line 1 got expanded after a subshell started,

Right; this is related to FAQ entry E4.

> and $$ got expanded before it started?

Right.  man bash:
       $      Expands  to  the  process ID of the shell.  In a ()
              subshell, it expands to the process ID of the  cur­
              rent shell, not the subshell.
This could be clarified, since the pipeline introduces a subshell
which is not a () subshell.


paul



reply via email to

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