bug-bash
[Top][All Lists]
Advanced

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

Re: process substitution flawed by design


From: Greg Wooledge
Subject: Re: process substitution flawed by design
Date: Mon, 20 Feb 2017 17:29:38 -0500
User-agent: Mutt/1.4.2.3i

On Mon, Feb 20, 2017 at 11:25:22PM +0100, Florian Mayer wrote:
> echo foo | tee >(echo $$) >(echo $$) >/dev/null | cat
> 
> returns the same PID twice.

$$ is the PID of the main shell.  I think what you want is the PID of
each subshell, $BASHPID.

imadev:~$ cat <(echo $$) <(echo $$)
3751
3751
imadev:~$ cat <(echo $BASHPID) <(echo $BASHPID)
3284
3285



reply via email to

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