if I launch a bash script as a child, I can pass its own pid to the parent by using $$.
Is there any way to find the pid of a program that I launch from a script in
The variable $! has the PID of the last background process you started.
$!