#!/bin/sh
echo -n "xian zhi ci shu:"
less $1 |grep -P '^\d' | wc -l
less $1 |grep -P '^S' | sort|uniq > /tmp/zcc.vmlist
while read line
do
echo $line
less $1 |grep -P "$line"|wc -l
done < /tmp/zcc.vmlist
echo -n "xian zhi ci shu:"
less $1 |grep -P '^\d' | wc -l
less $1 |grep -P '^S' | sort|uniq > /tmp/zcc.vmlist
while read line
do
echo $line
less $1 |grep -P "$line"|wc -l
done < /tmp/zcc.vmlist
rm /tmp/zcc.vmlist
本文转自 freeterman 51CTO博客,原文链接:http://blog.51cto.com/myunix/1215187,如需转载请自行联系原作者