当 test.txt
第 8 列的值中等于 “125”,输出第 5 列的值并排序去重计算行数,结果重定向到 test_out.txt
cat test.txt | awk '{ if($8=="125") { print $5}}' | sort | uniq | wc -l >> test_out.txt
当 test.txt
第 8 列的值中等于 “125”,输出第 5 列的值并排序去重计算行数,结果重定向到 test_out.txt
cat test.txt | awk '{ if($8=="125") { print $5}}' | sort | uniq | wc -l >> test_out.txt