匹配输出
cat test.txt | grep "result" | awk -v FS="|" '{if($4 == "5" && $7 == "0") print $0}'
匹配输出
cat test.txt | grep "result" | awk -v FS="|" '{if($4 > 100) print $0}'
统计次数
cat test.txt | grep "result" | awk -v FS="|" '{if($4 == "2" && $7 == "0") print $0}' | wc -l
网友评论