title: how to use grep command programmatically in node.js
body: <p>I am trying to Display only the <strong>vmRSS</strong> Attribute. When I run the command command</p>
  
  <pre><code>cat ./Status
  </code></pre>
  
  <p>I get alot of attributes and their corresponding values. What I am trying to do is to Display only the <strong>vmRSS</strong> programmatically. I can do it in the console as follows:</p>
  
  <pre><code>cat ./status | grep VmR
  </code></pre>
  
  <p>but how can I do it programmatically.</p>
  
  <p><strong>my attempts</strong></p>
  
  <pre><code>const ls2 = spawn('cat', ['/proc/' + process.pid + '/status']);
  </code></pre>