title: PHP: Get the LINUX PID of a command
body: <p>I'm running a command in my linux server (Ubuntu).
  For example:</p>
  <pre><code>screen -A -h 1500 -m -dmS test_command_one /home/SKY-users/SKY-001/./script
  </code></pre>
  <p>Is there any way to the PID of this background progress which screen name is: <code>test_command_one</code>?</p>
  <p>ps aux | grep test_command_one:</p>
  <pre><code>root      6573  8.1  2.4 271688 123804 pts/4   Ss+  Oct19   3:04 /home/SKY-users/SKY-001/./ ...
  </code></pre>
  <p>I'd like to get back this PID: <code>6573</code></p>
  <p>PHP: (easy)</p>
  <pre><code>&lt;?php 
  $output = shell_exec('sudo ps aux | grep test_command_one');
  $array = explode(&quot;\n&quot;, $output);
  echo '&lt;pre&gt;'.print_r($array, true).'&lt;/pre&gt;';
  ?&gt;
  </code></pre>
  <p>Thanks for help!</p>