-1

I know I can get process id of the main shell by $$, but how do you get PID of subshell created by e.g. ( ... ) from within the block?

jarno
  • 620

1 Answers1

1

You can use $BASHPID, to see the difference :

(echo $$ $BASHPID)
Philippe
  • 1,435