统计指定字符串出现次数

grep -o WARN 2.log | wc -l

备注:WARN为指定字符串,2.log为文本。

猜你喜欢

转载自blog.csdn.net/kevinsingapore/article/details/82431997