-1
  ID RT      EZ    Z0      Z1      Z2    RHO     PHE 

 1889  UN    NA  1.0000  0.0000  0.0000  0.8765  -1  
 1890  UN    NA  1.0000  0.0000  0.0000  0.4567  -1  
 1891  UN    NA  1.0000  0.0000  0.0000  0.0012  -1  
 1892  UN    NA  1.0000  0.0000  0.0000  0.1011  -1 

I would like to grep all the IDs that have column RHO with value less than 0.2, and the other columns are included for the selected rows.

I am a total newbie regarding this. Please help me :(

3

1 Answer 1

0
$ awk 'NF && $7<0.2' test.txt
1891  UN    NA  1.0000  0.0000  0.0000  0.0012  -1
1892  UN    NA  1.0000  0.0000  0.0000  0.1011  -1

This prints non-empty lines whose seventh column is numerically lower than 0.2.

1
  • 1
    Hi Adrian! Thank you so much. That command works just fine! God bless you! :) Mar 21, 2014 at 11:21

Not the answer you're looking for? Browse other questions tagged .