title: Shell Script not able to Kill Process
body: <p>I am using below script to find and kill process but its somehow not working. 
  Please help to edit this if any flaw. I am greping JVM. Using AIX Machine.</p>
  
  <pre><code>    PID=`ps -eaf | grep JVM| grep -v grep | awk '{print $2}'`
      if [[ "" !=  "$PID" ]]
      then
          echo "killing $PID" 
          kill $PID
      else
          echo "PID not found"
  
      fi
  </code></pre>