title: report grandchild process id to parent bash
body: <p>I would like to report the grand child process id to the parent either by storing it in a variable and exporting it or some other means. How is it possible? Below a small example. </p>
  
  <p>example .</p>
  
  <pre><code>parent.sh
      ./child.sh &amp;
       wait
       sleep 10
       echo $grandchild_pid
  
  child.sh
      ./grandchild.sh &amp;
       export grandchild_pid=$!
  </code></pre>