title: How do I get information /proc/$pid/smaps
body: <p>I have to make a bash script that kick <code>/proc/$pid/smaps</code> the following information and not as:</p>
  
  <pre><code>total memory: 2mb
  
  Memory resident: 3kb
  
  private memory + shared: 3kb
  
  Private total memory: 5kb
  </code></pre>
  
  <p>How do I access the data and add the cantiades? 
  if I do a <code>cat / proc / $ pid / smaps</code> gives me all the lines of the file and do not know how to select only those you want.</p>