linux统计字符串在文件出现次数

grep -c 'haha' *.txt //一行出现多次只算一次
grep -o 'haha' *.txt| wc -l

猜你喜欢

转载自blog.csdn.net/qf0129/article/details/78831401