Skip to main content
added 269 characters in body
Source Link
George Vasiliou
  • 8.1k
  • 3
  • 24
  • 43

Short answer with awk:As pointed out in comments, for a delimiter other than space (i.e tab as seems to be your case) bellow solutions would work ok.
If delimiter is space bellow solutions will not work. You need to clarify what is the real fields separator.

awk -F"\t" '$5>0.02' file

If you need to keep the header

#or
awk -F"\t" 'NR==1{print;next}$5>0.02' file #to keep the header
#or
awk -F"\t" 'NR==1 || $5>0.02' file  #as#also keeps header as advised in comments

To keep header and dashed row bellow header as advised by @Sundeep

#or 
awk -F"\t" 'NR<=2 || $5>0.02' file   #keep header and dashed row bellow header as advised by @Sundeep 

If you are in doubt about the format of the numeric values, you could even try

awk -F"\t" '($5*1)>0.02' file

Short answer with awk:

awk '$5>0.02' file

If you need to keep the header

awk 'NR==1{print;next}$5>0.02' file
#or
awk 'NR==1 || $5>0.02' file  #as advised in comments

To keep header and dashed row bellow header as advised by @Sundeep

awk 'NR<=2 || $5>0.02' file 

If you are in doubt about the format of the numeric values, you could even try

awk '($5*1)>0.02' file

As pointed out in comments, for a delimiter other than space (i.e tab as seems to be your case) bellow solutions would work ok.
If delimiter is space bellow solutions will not work. You need to clarify what is the real fields separator.

awk -F"\t" '$5>0.02' file
#or
awk -F"\t" 'NR==1{print;next}$5>0.02' file #to keep the header
#or
awk -F"\t" 'NR==1 || $5>0.02' file  #also keeps header as advised in comments
#or 
awk -F"\t" 'NR<=2 || $5>0.02' file   #keep header and dashed row bellow header as advised by @Sundeep 

If you are in doubt about the format of the numeric values, you could even try

awk -F"\t" '($5*1)>0.02' file
added 165 characters in body
Source Link
George Vasiliou
  • 8.1k
  • 3
  • 24
  • 43

Short answer with awk:

awk '$5>0.02' file

If you need to keep the header

awk 'NR==1{print;next}$5>0.02' file
#or
awk 'NR==1 || $5>0.02' file  #as advised in comments

To keep header and dashed row bellow header as advised by @Sundeep

awk 'NR<=2 || $5>0.02' file 

If you are in doubt about the format of the numeric values, you could even try

awk 'NR==1{print;next}'($5*1)>0.02' file

Short answer with awk:

awk '$5>0.02' file

If you need to keep the header

awk 'NR==1{print;next}$5>0.02' file

If you are in doubt about the format of the values, you could even try

awk 'NR==1{print;next}($5*1)>0.02' file

Short answer with awk:

awk '$5>0.02' file

If you need to keep the header

awk 'NR==1{print;next}$5>0.02' file
#or
awk 'NR==1 || $5>0.02' file  #as advised in comments

To keep header and dashed row bellow header as advised by @Sundeep

awk 'NR<=2 || $5>0.02' file 

If you are in doubt about the format of the numeric values, you could even try

awk '($5*1)>0.02' file
Source Link
George Vasiliou
  • 8.1k
  • 3
  • 24
  • 43

Short answer with awk:

awk '$5>0.02' file

If you need to keep the header

awk 'NR==1{print;next}$5>0.02' file

If you are in doubt about the format of the values, you could even try

awk 'NR==1{print;next}($5*1)>0.02' file