title: Find out the running process ID by package name
body: <p>I am working on a script in which I need to supply the PID of my application. I am able to list all the processes with their PIDs by following command and could see the entry of my application.</p>
  
  <blockquote>
    <p>adb shell ps</p>
  </blockquote>
  
  <p>This gives me a huge list of processes. And I need a single entry (which I can further supply to another command), so I want to filter this results with a package name. The grep command does not work on my windows machine. Also tried following command but it didn't help.</p>
  
  <blockquote>
    <p>adb shell ps name:my_app_package</p>
  </blockquote>