-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
  • 590
  • 4
  • 22

1 Answers1

1

You can use $BASHPID, to see the difference :

(echo $$ $BASHPID)
Philippe
  • 1,275
  • 7
  • 14