title: Reading output of a command into an array in Bash
body: <p>I need to read the output of a command in my script into an array. The command is, for example:</p>
  
  <pre><code>ps aux | grep | grep | x 
  </code></pre>
  
  <p>and it gives the output line by line like this:</p>
  
  <pre><code>10
  20
  30
  </code></pre>
  
  <p>I need to read the values from the command output into an array, and then I will do some work if the size of the array is less than three.</p>