统计文件里面特定字符串出现次数
有三种方法:
1.
grep -o '字符串' file | wc -l
2.
awk -v RS="@#$j" '{print gsub(/字符串/,"&")}' file
3.
awk'{s+=gsub(/字符串/,"&")}END{prints}'file
相关推荐
Noneyes 2020-11-10
huavhuahua 2020-11-20
weiiron 2020-11-16
ailxxiaoli 2020-11-16
cakecc00 2020-11-15
千锋 2020-11-15
JakobHu 2020-11-14
chensen 2020-11-14
Nostalgiachild 2020-11-13
guangcheng 2020-11-13
zhangxiafll 2020-11-13
jipengx 2020-11-12
xirongxudlut 2020-11-10
solarLan 2020-11-09
pythonxuexi 2020-11-08
文山羊 2020-11-07
susmote 2020-11-07
wuShiJingZuo 2020-11-05
Pythonjeff远 2020-11-06