0

When I write the following command:

awk '$3 != 0.00 && $5 < 0.2' file

The condition applies only if $2 is not empty.

Why? The tab is there

4

1 回答 1

2

You need to specify to awk that you are using a tab delimiter, and that is a special case. I tested the following:

echo -e "a\tb\tc\td\te" | awk -F$'\t' '{print NF}'

The answer is 5, so it seems to work. The $ is necessary here.

于 2012-05-29T11:51:37.437 回答