title: Filtering Linux command output
body: <p>I need to get a row based on column value just like querying a database. I have a command output like this,</p>
  
  <blockquote>
    <p>Name  ID  Mem VCPUs      State<br>
    Time(s)</p>
    
    <p>Domain-0   0  15485  16       r-----
    1779042.1</p>
    
    <p>prime95-01                512     1<br>
    -b----  61.9</p>
  </blockquote>
  
  <p>Here I need to list only those rows where state is "r". Something like this,</p>
  
  <blockquote>
    <p>Domain-0               0  15485  16<br>
    r----- 1779042.1</p>
  </blockquote>
  
  <p>I have tried using "grep" and "awk" but still I am not able to succeed. </p>
  
  <p>Please help me on this issue.</p>
  
  <p>Regards,
  Raaj</p>