title: shell command to find a process id and attach to it?
body: <p>I want to attach to a running process using 'ddd', what I manually do is:</p>
  
  <pre><code># ps -ax | grep PROCESS_NAME
  </code></pre>
  
  <p>Then I get a list and the pid, then I type:</p>
  
  <pre><code># ddd PROCESS_NAME THE_PID
  </code></pre>
  
  <p>Is there is a way to type just one command directly?</p>
  
  <p>Remark: When I type <code>ps -ax | grep PROCESS_NAME</code>, grep will match both the process and <code>grep</code> command line itself.</p>