title: How to send to stdin in bash 10 seconds after starting the process?
body: <p>What I want to do is:</p>
  
  <ul>
  <li>run a process</li>
  <li>wait 10 seconds</li>
  <li>send a string to the stdin of the process</li>
  </ul>
  
  <p>This should be done in a bash script.</p>
  
  <p>I've tried:</p>
  
  <pre><code>./script&amp;
  pid=$!
  sleep 10
  echo $string &gt; /proc/${pid}/fd/0
  </code></pre>
  
  <p>It does work in a shell but not when I run it in a script.</p>