using awk with column value conditions

前端 未结 6 505
甜味超标
甜味超标 2020-11-29 18:10

I\'m learning awk from The AWK Programming Language and I have a problem with one of the examples.

If I wanted to print $3 if $2 is equal to a value (e.g.1

6条回答
  •  甜味超标
    2020-11-29 19:08

    please try this

    echo $VAR | grep ClNonZ | awk '{print $3}';
    

    or

    echo cat filename | grep ClNonZ | awk '{print $3}';
    

提交回复
热议问题