awk 匹配变量,

cat file.txt | awk '{ if ($7~/'"$i"'/) {print $0} }'| wc -l ; 

posted @ 2017-03-16 14:24  白鸟li  阅读(1304)  评论(0编辑  收藏  举报