cat count.log | awk ‘{print $7}‘ | awk ‘{if ($1 == "-") empty++ }END {print NR, empty, empty/NR}‘
一行统计shell
原文:http://www.cnblogs.com/allenhaozi/p/4917850.html