Absolute value in awk doesn't work?

前端 未结 4 887
臣服心动
臣服心动 2021-01-07 19:56

I want to select line of a file where the absolute value of column 9 is less than 500. Column is sometimes positive, sometimes negative.

awk -F\'\\t\' \'{ if         


        
4条回答
  •  -上瘾入骨i
    2021-01-07 20:11

    Is this too obvious and/or not elegant ?

    awk -F'\t' '$9 < 500 && $9 > -500' > output.bam
    

提交回复
热议问题