title: Getting PID of process in Shell Script
body: <p>I am writing one shell script and I want to get PID of one process with name as "ABCD". What i did was :</p>
  
  <pre><code>process_id=`/bin/ps -fu $USER|grep "ABCD"|awk '{print $2}'`
  </code></pre>
  
  <p>This gets PID of two processes i.e. of process ABCD and the GREP command itself what if I don't want to get PID of GREP executed and I want PID only of ABCD process?</p>
  
  <p>Please suggest.</p>